 |
Appendix A. Verilog Examples - Department of Electrical and Computer Engineering
module encoder (value, gray_code); input [7:0] value; output [3:0] gray_code; always @(value) case (value) 8’b00000001 : gray_code = 3’b000; 8’b00000010 : gray_code = 3’b001; 8’b00000100 : gray_code = 3’b011; 8’b00001000 : gray_code = 3’b010; 8 ...
www.ece.ncsu.edu |
 |