Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COSIM][2mm][SMALL] mismatched ports #19

Open
kumasento opened this issue Sep 16, 2021 · 2 comments
Open

[COSIM][2mm][SMALL] mismatched ports #19

kumasento opened this issue Sep 16, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@kumasento
Copy link
Owner

kumasento commented Sep 16, 2021

Command

./scripts/pb-flow.py ./example/polybench --work-dir ./tmp/phism/pb-flow.small.polymer --dataset SMALL -p --loop-transforms --array-partition -e 2mm --cosim

Error

ERROR: [VRFC 10-3180] cannot find port 'D_1_q0' on this module [/mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/linear-algebra/kernels/2mm/tb/solution1/sim/verilog/kernel_2mm.autotb.v:246]
ERROR: [VRFC 10-3180] cannot find port 'D_0_q0' on this module [/mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/linear-algebra/kernels/2mm/tb/solution1/sim/verilog/kernel_2mm.autotb.v:241]

Discoveries

From kernel_2mm.v

module kernel_2mm (
        ap_clk,
        ap_rst,
        ap_start,
        ap_done,
        ap_idle,
        ap_ready,
        ni,
        nj,
        nk,
        nl,
        alpha,
        beta,
        tmp_0_address0,
        tmp_0_ce0,
        tmp_0_we0,
        tmp_0_d0,
        tmp_0_q0,
        tmp_0_address1,
        tmp_0_ce1,
        tmp_0_q1,
        tmp_1_address0,
        tmp_1_ce0,
        tmp_1_we0,
        tmp_1_d0,
        tmp_1_q0,
        tmp_1_address1,
        tmp_1_ce1,
        tmp_1_q1,
        A_0_address0,
        A_0_ce0,
        A_0_q0,
        A_1_address0,
        A_1_ce0,
        A_1_q0,
        B_0_address0,
        B_0_ce0,
        B_0_q0,
        B_1_address0,
        B_1_ce0,
        B_1_q0,
        B_2_address0,
        B_2_ce0,
        B_2_q0,
        C_0_address0,
        C_0_ce0,
        C_0_q0,
        C_1_address0,
        C_1_ce0,
        C_1_q0,
        D_0_address0,
        D_0_ce0,
        D_0_we0,
        D_0_d0,
        D_0_address1,
        D_0_ce1,
        D_0_q1,
        D_1_address0,
        D_1_ce0,
        D_1_we0,
        D_1_d0,
        D_1_address1,
        D_1_ce1,
        D_1_q1
);

From kernel_2mm.autotb.v:

`AUTOTB_DUT `AUTOTB_DUT_INST(
    .ap_clk(ap_clk),
    .ap_rst(ap_rst),
    .ap_start(ap_start),
    .ap_done(ap_done),
    .ap_idle(ap_idle),
    .ap_ready(ap_ready),
    .ni(ni),
    .nj(nj),
    .nk(nk),
    .nl(nl),
    .alpha(alpha),
    .beta(beta),
    .tmp_0_address0(tmp_0_address0),
    .tmp_0_ce0(tmp_0_ce0),
    .tmp_0_we0(tmp_0_we0),
    .tmp_0_d0(tmp_0_d0),
    .tmp_0_q0(tmp_0_q0),
    .tmp_1_address0(tmp_1_address0),
    .tmp_1_ce0(tmp_1_ce0),
    .tmp_1_we0(tmp_1_we0),
    .tmp_1_d0(tmp_1_d0),
    .tmp_1_q0(tmp_1_q0),
    .A_0_address0(A_0_address0),
    .A_0_ce0(A_0_ce0),
    .A_0_q0(A_0_q0),
    .A_1_address0(A_1_address0),
    .A_1_ce0(A_1_ce0),
    .A_1_q0(A_1_q0),
    .B_0_address0(B_0_address0),
    .B_0_ce0(B_0_ce0),
    .B_0_q0(B_0_q0),
    .B_1_address0(B_1_address0),
    .B_1_ce0(B_1_ce0),
    .B_1_q0(B_1_q0),
    .C_0_address0(C_0_address0),
    .C_0_ce0(C_0_ce0),
    .C_0_q0(C_0_q0),
    .C_1_address0(C_1_address0),
    .C_1_ce0(C_1_ce0),
    .C_1_q0(C_1_q0),
    .D_0_address0(D_0_address0),
    .D_0_ce0(D_0_ce0),
    .D_0_we0(D_0_we0),
    .D_0_d0(D_0_d0),
    .D_0_q0(D_0_q0),
    .D_1_address0(D_1_address0),
    .D_1_ce0(D_1_ce0),
    .D_1_we0(D_1_we0),
    .D_1_d0(D_1_d0),
    .D_1_q0(D_1_q0));
  1. autotb presumes the memory partitions of D have only one port.
  2. Phism has 3 partitions for B, while autotb has 2.
@kumasento kumasento added the bug Something isn't working label Sep 16, 2021
@kumasento
Copy link
Owner Author

kumasento commented Sep 16, 2021

tbgen.tcl

open_project -reset tb
add_files {/mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/linear-algebra/kernels/2mm/2mm.c} -cflags "-I /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/linear-algebra/kernels/2mm -I /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/utilities -D SMALL_DATASET" -csimflags "-I /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/linear-algebra/kernels/2mm -I /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/utilities -DSMALL_DATASET"
add_files -tb {/mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/linear-algebra/kernels/2mm/2mm.c /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/utilities/polybench.c} -cflags "-I /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/linear-algebra/kernels/2mm -I /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/utilities -DSMALL_DATASET" -csimflags "-I /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/linear-algebra/kernels/2mm -I /mnt/ccnas2/bdp/rz3515/projects/phism/tmp/phism/pb-flow.small.polymer/utilities -DSMALL_DATASET"
set_top kernel_2mm
open_solution -reset solution1
set_part "zynq"
create_clock -period "100MHz"
config_bind -effort high
set_directive_array_partition -dim 1 -factor 2 -type block "kernel_2mm" tmp
set_directive_array_partition -dim 2 -factor 2 -type block "kernel_2mm" tmp
set_directive_array_partition -dim 1 -factor 2 -type block "kernel_2mm" A
set_directive_array_partition -dim 2 -factor 3 -type block "kernel_2mm" A
set_directive_array_partition -dim 1 -factor 3 -type block "kernel_2mm" B # < ------ Seems that B should be partitioned into 3 parts.
set_directive_array_partition -dim 2 -factor 2 -type block "kernel_2mm" B
set_directive_array_partition -dim 1 -factor 2 -type block "kernel_2mm" C
set_directive_array_partition -dim 2 -factor 3 -type block "kernel_2mm" C
set_directive_array_partition -dim 1 -factor 2 -type block "kernel_2mm" D
set_directive_array_partition -dim 2 -factor 3 -type block "kernel_2mm" D
csim_design
csynth_design
cosim_design
exit

@kumasento
Copy link
Owner Author

Mismatched partition has been fixed by #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants