Skip to content

Commit

Permalink
Add buffers when pc remains constant
Browse files Browse the repository at this point in the history
  • Loading branch information
meiniKi committed Apr 3, 2024
1 parent 0128cfe commit 5dc5b2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions rtl/fazyrv_pc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ assign carry_vec[0] = carry_r[0];
// www.github.com/MichaelBell/tinyQV/blob/69ce898bf1122e91a3114f3f0fe8e4bdf242f7f0/cpu/register.v#L58
//

logic [31-CHUNKSIZE:0] pc_dlyd;
logic [31:0] pc_dlyd;
`ifdef SKY130
sky130_fd_sc_hd__dlygate4sd3_1 i_buf[31-CHUNKSIZE:0] ( .X(pc_dlyd), .A(pc_r[31:CHUNKSIZE]) );
sky130_fd_sc_hd__dlygate4sd3_1 i_buf[31:0] ( .X(pc_dlyd), .A(pc_r) );
`else
buf #1 i_buf[31:CHUNKSIZE] (pc_dlyd, pc_r[31:CHUNKSIZE]);
buf #1 i_buf[31:0] (pc_dlyd, pc_r);
`endif

assign pc_n = shift_i ? {din_i, pc_dlyd} : pc_r;
assign pc_n = shift_i ? {din_i, pc_dlyd[31:CHUNKSIZE]} : pc_dlyd;

always_ff @(posedge clk_i) begin
if (~rst_in) begin
Expand Down
2 changes: 1 addition & 1 deletion rtl/fazyrv_shftreg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ logic [31-CHUNKSIZE:0] reg_dlyd;
`ifdef SKY130
sky130_fd_sc_hd__dlygate4sd3_1 i_buf[31-CHUNKSIZE:0] ( .X(reg_dlyd), .A(reg_r[31:CHUNKSIZE]) );
`else
buf #1 i_buf[31:CHUNKSIZE] (reg_dlyd, reg_r[31:CHUNKSIZE]);
buf #1 i_buf[31-CHUNKSIZE:0] (reg_dlyd, reg_r[31:CHUNKSIZE]);
`endif

assign dat_o = reg_r[CHUNKSIZE-1:0];
Expand Down

0 comments on commit 5dc5b2c

Please sign in to comment.