Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[問題] 請問verilog 3維array synthesis

182 views
Skip to first unread message

p p

unread,
May 1, 2011, 5:42:38 AM5/1/11
to

請問大家

我目前寫到一份code用到三維陣列

reg signed [17:0] out_p [0:255][0:511];


wire signed Y0 [17:0];
wire [7:0] index_y;
wire [8:0] index_x;


always@(negedge clk)begin


[1;33mout_p [index_y][index_x] <= Y0; [m


end

這份code的其他部分都可以synthesis(註解掉黃色那行 就可以synthesis)

就是黃色那行不行(會一直停留在compiling source file ...的畫面 一整天都不動)

試過如果把index換成常數

就像是變成 out_p [1][1] <= Y0; 就可以

可是因為function需要index一定需要是變數

想請問大家有沒有這方面的經驗

使用三維陣列index又是變數時

該怎麼寫才能夠synthesis呢

麻煩高手解惑

感謝大家<_ _>

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.136.186.128
※ 編輯: qeaflish 來自: 220.136.186.128 (05/01 17:42)

aaa

unread,
May 2, 2011, 4:27:39 AM5/2/11
to
※ 引述《qeaflish (p p )》之銘言:
: 請問大家

: 我目前寫到一份code用到三維陣列
: reg signed [17:0] out_p [0:255][0:511];
: wire signed Y0 [17:0];
: wire [7:0] index_y;
: wire [8:0] index_x;
: always@(negedge clk)begin
: out_p [index_y][index_x] <= Y0;
: end

: 這份code的其他部分都可以synthesis(註解掉黃色那行 就可以synthesis)
: 就是黃色那行不行(會一直停留在compiling source file ...的畫面 一整天都不動)
: 試過如果把index換成常數
: 就像是變成 out_p [1][1] <= Y0; 就可以
: 可是因為function需要index一定需要是變數
: 想請問大家有沒有這方面的經驗
: 使用三維陣列index又是變數時
: 該怎麼寫才能夠synthesis呢
: 麻煩高手解惑
: 感謝大家<_ _>

我用過的Tool都沒辦法合成3維的,

只能用2D, 然後自己去算Address,

不過你的陣列大小是2的power, 所以把他接起來就好了


reg signed [17:0] out_p [ [1;32m0:256*512-1 [m];


wire signed Y0 [17:0];
wire [7:0] index_y;
wire [8:0] index_x;
always@(negedge clk)begin

out_p [ [1;32m{index_y, index_x} [m] <= Y0;
end


--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.88.20

0 new messages