by tcas · 13y ago · 0 comments
1 nit pick, I think wherever you use a wire assignment you need the assign keyword. e.g
wire [1:0] command = mem_out[7:6];
wire [2:0] destination_addr = mem_out[6:3];
wire [2:0] source_addr = mem_out[2:0];
should be assign wire [1:0] command = mem_out[7:6];
assign wire [2:0] destination_addr = mem_out[6:3];
assign wire [2:0] source_addr = mem_out[2:0];
Or maybe it's wire assign. I usually first declare the wire in a single statement then use assign on a new line.[0] http://www.verilogtutorial.info/chapter_2.htm [1] http://www.doulos.com/knowhow/verilog_designers_guide/wire_a...
In looking it up, I did come across the keyword "alias", which I was not familiar with, that effectively does what you've done here.
That said, it doesn't detract from an enjoyable tutorial. It's nice to see a little ASIC content on HN - duly upvoted!
It appears to be valid, and does not require "assign".
This is what I like about HN - smart people keeping me on my toes!