mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-29 03:45:52 +00:00
initial import
This commit is contained in:
commit
7764d0ba1d
481 changed files with 54634 additions and 0 deletions
29
tests/openmsp430/sim_mul.v
Normal file
29
tests/openmsp430/sim_mul.v
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
module \$mul (A, B, Y);
|
||||
|
||||
parameter A_SIGNED = 0;
|
||||
parameter B_SIGNED = 0;
|
||||
parameter A_WIDTH = 0;
|
||||
parameter B_WIDTH = 0;
|
||||
parameter Y_WIDTH = 0;
|
||||
|
||||
input [A_WIDTH-1:0] A;
|
||||
generate if (A_SIGNED) begin:A_BUF
|
||||
wire signed [A_WIDTH-1:0] val = A;
|
||||
end else begin:A_BUF
|
||||
wire [A_WIDTH-1:0] val = A;
|
||||
end endgenerate
|
||||
|
||||
input [B_WIDTH-1:0] B;
|
||||
generate if (B_SIGNED) begin:B_BUF
|
||||
wire signed [B_WIDTH-1:0] val = B;
|
||||
end else begin:B_BUF
|
||||
wire [B_WIDTH-1:0] val = B;
|
||||
end endgenerate
|
||||
|
||||
output [Y_WIDTH-1:0] Y;
|
||||
|
||||
assign Y = A_BUF.val * B_BUF.val;
|
||||
|
||||
endmodule
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue