Skip to content

Commit

Permalink
Fixed a problem with databus sizing.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizioferrandi committed Apr 13, 2024
1 parent bfe5440 commit 9a4e678
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions etc/lib/technology/NC_MEM_IPs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3058,12 +3058,16 @@ function [n_byte_on_databus*2-1:0] CONV;
input [n_byte_on_databus*2-1:0] po2;
begin
case (po2)
1:CONV=(1<<1)-1;
2:CONV=(1<<2)-1;
4:CONV=(1<<4)-1;
8:CONV=(1<<8)-1;
16:CONV=(1<<16)-1;
32:CONV=(1<<32)-1;
1:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<1)-1;
2:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<2)-1;
4:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<4)-1;
8:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<8)-1;
16:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<16)-1;
32:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<32)-1;
64:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<64)-1;
128:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<128)-1;
256:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<256)-1;
512:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<512)-1;
default:CONV=-1;
endcase
end
Expand Down Expand Up @@ -3719,12 +3723,16 @@ function [n_byte_on_databus*max_n_writes-1:0] CONV;
input [n_byte_on_databus*max_n_writes-1:0] po2;
begin
case (po2)
1:CONV=(1<<1)-1;
2:CONV=(1<<2)-1;
4:CONV=(1<<4)-1;
8:CONV=(1<<8)-1;
16:CONV=(1<<16)-1;
32:CONV=(1<<32)-1;
1:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<1)-1;
2:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<2)-1;
4:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<4)-1;
8:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<8)-1;
16:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<16)-1;
32:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<32)-1;
64:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<64)-1;
128:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<128)-1;
256:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<256)-1;
512:CONV=({{n_byte_on_databus*2-1{1'b0}},1'b1}<<512)-1;
default:CONV=-1;
endcase
end
Expand Down

0 comments on commit 9a4e678

Please sign in to comment.