yosys4gal/testcases/reg_tristate.v
2024-04-04 20:39:30 -05:00

15 lines
151 B
Verilog

module reg_tristate (
input clk,
input a, b, c,
output y
);
reg x;
assign y = c && b ? x : 1'bz;
always @ (posedge clk)
x <= a && b;
endmodule