1
我有問題使用submod命令分區我的頂級模塊。如何使用submod命令將頂層模塊劃分爲2個子模塊?
我有一個簡單的計數器(我有一個4位計數器的行爲代碼)。在它下面的單元格:
yosys> select -list
counter
counter/$procmux$4_Y
counter/$add$counter.v:10$2_Y
counter/$0\count[3:0]
counter/count
counter/en
counter/rst
counter/clk
counter/$procdff$9
counter/$procmux$7
counter/$procmux$4
counter/$add$counter.v:10$2
現在我想把下面的細胞進入一個子模塊:
counter/$procdff$9
counter/$procmux$7
我不知道如何使用select
,setattr
,submod
這樣做。任何幫助是極大的讚賞。
謝謝
Verilog代碼爲我的計數器:
module module counter (clk, rst, en, count);
input clk, rst, en;
output reg [3:0] count;
always @(posedge clk)
if (rst)
count <= 4'd0;
else if (en)
count <= count + 4'd1;
endmodule
看起來不錯。如果您想避免枚舉所有對象,請參閱'help select'以獲取更復雜的選擇對象的方法。 – CliffordVienna