3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-15 03:35:40 +00:00
yosys/tests/silimate/opt_vps_read_ref.sv
2026-04-07 22:07:14 -07:00

16 lines
407 B
Systemverilog

// Reference for VPS read: uses right-shift instead of variable part-select.
module opt_vps_read (
input logic clk,
input logic wr_en,
input logic [7:0] index,
input logic [255:0] wdata,
output logic [31:0] q
);
logic [255:0] reg_data;
always_ff @(posedge clk)
if (wr_en)
reg_data <= wdata;
assign q = (reg_data >> index);
endmodule