I am having problem partitioning my top module using using submod command.
I have a simple counter (I have a behavioral code for a 4bit counter). with the following cells in it:
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
Now I want to put the following cells into a submodule:
counter/$procdff$9
counter/$procmux$7
I do not know how to use select
, setattr
, submod
to do so. Any help is greatly appreciated.
Thank you
verilog code for my counter:
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