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_wide.sv
2026-04-03 01:15:17 -07:00

14 lines
423 B
Systemverilog

// 128-bit register with 16-bit lane writes indexed by a 3-bit selector (VPS).
module opt_vps_wide (
input logic clk,
input logic wr_en,
input logic [2:0] lane,
input logic [15:0] wdata,
output logic [127:0] q
);
logic [127:0] reg_data;
always_ff @(posedge clk)
if (wr_en)
reg_data[((lane + 1) * 16) - 1 -: 16] <= wdata;
assign q = reg_data;
endmodule