Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

the error

I used quatus2 to do some a decoder, but it couldn't work when it was at the process of vector waveform file...who can help me ??:p which process is wrong?

here is the test..

module decoder(clken,code,reset,decode);

input clken;

input [2:0]code;

input reset;

output [7:0] decode;

reg[7:0] decode;

always @(code)

begin

if(reset)

decode<=8'b11111111;

else if(clken)

case (code)

3'b000: decode <= 8'b01111111;

3'b001: decode <= 8'b10111111;

3'b010: decode <= 8'b11011111;

3'b011: decode <= 8'b11101111;

3'b100: decode <= 8'b11110111;

3'b101: decode <= 8'b11111011;

3'b110: decode <= 8'b11111101;

3'b111: decode <= 8'b11111110;

endcase //&#34920;&#32467;&#26463;

end

endmodule
No RepliesBe the first to reply