comma_fix: correct shift operation

This commit is contained in:
Jörg Thalheim 2015-01-14 10:42:34 +01:00
parent 4d93ceb744
commit 974a51b403

View File

@ -2,11 +2,10 @@ module heron_comma_fix (A,Y);
parameter comma = 8; parameter comma = 8;
parameter comma_fix = comma / 2; parameter comma_fix = comma / 2;
input [31:0] A; input [31:0] A;
output [31:0] Y; output [31:0] Y;
wire [31:0] Y; wire [31:0] Y;
assign Y[(31 - comma_fix):0] = A[(31 - comma_fix):0]; assign Y[31: comma_fix] = A[31 - comma_fix: 0];
assign Y[31:(31 - comma_fix)] = 0; assign Y[(comma_fix - 1):0] = 1'b0;
endmodule endmodule