S
SpainHack
Guest
Hello All,
I\'m just getting started with Verilog.
I created the following Programs Counter for a simple Stack Machine.
The PC is an 8-bit register that stores the address of the command being executed.
The clock pulse at the positive edge of the clock signal (except mode = 2).
If mode = 0 reset PC to 0
If mode = 1, set the PC value to be equal to the value in the data bus.
If mode = 2, write the PC value to the data bus.
If mode = 3 do nothing (value z at data bus)
If mode = 4, increase PC by one unit.
Here is a GIST with the code...
https://gist.github.com/jemo07/5d5ba7d31bb12410888f46ca6060a1f2
I\'m testing it at: https://8bitworkshop.com
And I getting errors on:
case( pc_mode[2:0] )
Case values incompletely covered (example pattern 0x5)
3\'b000:
begin
pc_value[7:0] = 8\'b0000_0000;
(clock_divider.v:21)Â 20: Blocking assignments (=) in sequential (flop or latch) block
temp[7:0] = 8\'bzzzz_zzzz;
Any ideas?
I was trying to run it as an if statement but ran into this...
https://www.kevnugent.com/2020/10/22/verilog-blogpost_002/
And I decided to go with the case statement, but it does not seem to work or it\'s not properly validated in the tool...
Cheers
Jose.
I\'m just getting started with Verilog.
I created the following Programs Counter for a simple Stack Machine.
The PC is an 8-bit register that stores the address of the command being executed.
The clock pulse at the positive edge of the clock signal (except mode = 2).
If mode = 0 reset PC to 0
If mode = 1, set the PC value to be equal to the value in the data bus.
If mode = 2, write the PC value to the data bus.
If mode = 3 do nothing (value z at data bus)
If mode = 4, increase PC by one unit.
Here is a GIST with the code...
https://gist.github.com/jemo07/5d5ba7d31bb12410888f46ca6060a1f2
I\'m testing it at: https://8bitworkshop.com
And I getting errors on:
case( pc_mode[2:0] )
Case values incompletely covered (example pattern 0x5)
3\'b000:
begin
pc_value[7:0] = 8\'b0000_0000;
(clock_divider.v:21)Â 20: Blocking assignments (=) in sequential (flop or latch) block
temp[7:0] = 8\'bzzzz_zzzz;
Any ideas?
I was trying to run it as an if statement but ran into this...
https://www.kevnugent.com/2020/10/22/verilog-blogpost_002/
And I decided to go with the case statement, but it does not seem to work or it\'s not properly validated in the tool...
Cheers
Jose.