Bwargh
Newbie level 3
Hello all,
I'm brand new to Verilog and hardware design all together. I've recently purchased the Nexy2 (Spartan3e) Board. I'm having trouble on how to approach the code portion of writing decoder and encoder modules as well as the module that will instantiate them together. I'm attempting to get this code to display on my board through the board as well.
Right now the only thing I have completed is (and I'm going to assume it's wrong) :
Help much appreciated. I'm really hoping to learn this.
Thanks.
I'm brand new to Verilog and hardware design all together. I've recently purchased the Nexy2 (Spartan3e) Board. I'm having trouble on how to approach the code portion of writing decoder and encoder modules as well as the module that will instantiate them together. I'm attempting to get this code to display on my board through the board as well.
Right now the only thing I have completed is (and I'm going to assume it's wrong) :
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 module decoder (s, y); input [2:0] s; output [7:0] y; wire [7:0] y; assign y = (s == 3'b000) ? 8'h01 : (s == 3'b001) ? 8'h02 : (s == 3'b010) ? 8'h04 : (s == 3'b011) ? 8'h08 : (s == 3'b100) ? 8'h10 : (s == 3'b101) ? 8'h20 : (s == 3'b110) ? 8'h40 : (s == 3'b111) ? 8'h80 : 8'bx; endmodule
Help much appreciated. I'm really hoping to learn this.
Thanks.
Last edited by a moderator: