mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-11 03:33:36 +00:00
Problems/questions: - memory.ys: ERROR: Failed to import cell gate.mem.0.0.0 (type EG_LOGIC_DRAM16X4) to SAT database. Why EG_LOGIC_DRAM16X4, not AL_LOGIC_BRAM? - Internal cell type $_TBUF_ is present.
20 lines
394 B
Verilog
20 lines
394 B
Verilog
module top (
|
|
input clock,
|
|
input [31:0] dinA, dinB,
|
|
input [2:0] opcode,
|
|
output reg [31:0] dout
|
|
);
|
|
always @(posedge clock) begin
|
|
case (opcode)
|
|
0: dout <= dinA + dinB;
|
|
1: dout <= dinA - dinB;
|
|
2: dout <= dinA >> dinB;
|
|
3: dout <= $signed(dinA) >>> dinB;
|
|
4: dout <= dinA << dinB;
|
|
5: dout <= dinA & dinB;
|
|
6: dout <= dinA | dinB;
|
|
7: dout <= dinA ^ dinB;
|
|
endcase
|
|
end
|
|
endmodule
|