D
dcell
Guest
Could anyone look at my code here and tell me what the HELL is wrong
with it?
I keep getting an error complaining about endmodule. I'm about ready
to destroy something.
Thanks.
module barrel(data_in, shift, data_out) ;
input [3:0]data_in;
input [1:0]shift;
output [3:0]data_out;
reg [3:0]data_out;
always@(data_in or shift)
case(shift)
0: data_out <= data_in ;
1: data_out <= data_in*2 ;
2: data_out <= data_in*4 ;
3: data_out <= data_in*8 ;
endmodule
with it?
I keep getting an error complaining about endmodule. I'm about ready
to destroy something.
Thanks.
module barrel(data_in, shift, data_out) ;
input [3:0]data_in;
input [1:0]shift;
output [3:0]data_out;
reg [3:0]data_out;
always@(data_in or shift)
case(shift)
0: data_out <= data_in ;
1: data_out <= data_in*2 ;
2: data_out <= data_in*4 ;
3: data_out <= data_in*8 ;
endmodule