Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TrackletGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def populate_bitwidths(mem,hls_dir): # FIXME this information should be parsed f
if barrelPS>-1 or barrel2S>-1: mem.bitwidth = 52
if disk>-1: mem.bitwidth = 55
elif mem.mtype == "TrackWord":
mem.bitwidth = 104
mem.bitwidth = 113
elif mem.mtype == "BarrelStubWord":
mem.bitwidth = 46
elif mem.mtype == "DiskStubWord":
Expand Down Expand Up @@ -504,7 +504,7 @@ def split_track_fit_streams(p_dict, m_dict):
for up_m in up_p.upstreams:
if up_m.mtype != "FullMatch":
continue
layer = up_m.inst.split("_")[-1][0:2]
layer = up_m.inst.split("_")[2][0:2]
assert(layer.startswith("L") or layer.startswith("D"))
layers.add(layer)

Expand Down
8 changes: 4 additions & 4 deletions WriteVHDLSyntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ def writeControlSignals_interface(initial_proc, final_procs, notfinal_procs, del
string_ctrl_signals += " "+final_proc_short+"_bx_out : out std_logic_vector(2 downto 0);\n"
string_ctrl_signals += " "+final_proc_short+"_bx_out_vld : out std_logic;\n"
string_ctrl_signals += " "+final_proc_short+"_done : out std_logic;\n"
if final_proc_short == "FT":
if final_proc_short == "TB":
for final_proc in final_procs:
string_ctrl_signals += " "+final_proc+"_last_track : out std_logic;\n"
string_ctrl_signals += " "+final_proc+"_last_track_vld : out std_logic;\n"
Expand Down Expand Up @@ -1071,7 +1071,7 @@ def writeTBControlSignals(memDict, memInfoDict, initial_proc, final_procs, notfi
string_ctrl_signals += (" signal "+final_procs[-1].mtype_short()+"_bx_out").ljust(str_len)+": std_logic_vector(2 downto 0) := (others => '1');\n"
string_ctrl_signals += (" signal "+final_procs[-1].mtype_short()+"_bx_out_vld").ljust(str_len)+": std_logic := '0';\n"
string_ctrl_signals += (" signal "+final_procs[-1].mtype_short()+"_done").ljust(str_len)+": std_logic := '0';\n"
if final_procs[-1].mtype_short().startswith("FT"):
if final_procs[-1].mtype_short().startswith("TB"):
for final_proc in final_procs:
string_ctrl_signals += (" signal "+final_proc.inst+"_last_track").ljust(str_len)+": std_logic := '0';\n"
string_ctrl_signals += (" signal "+final_proc.inst+"_last_track_vld").ljust(str_len)+": std_logic := '0';\n"
Expand Down Expand Up @@ -1219,7 +1219,7 @@ def writeFWBlockInstance(topfunc, memDict, memInfoDict, initial_proc, final_proc
string_fwblock_inst += (" " + final_procs[-1].mtype_short() + "_bx_out").ljust(str_len) + "=> " + final_procs[-1].mtype_short() + "_bx_out,\n"
string_fwblock_inst += (" " + final_procs[-1].mtype_short() + "_bx_out_vld").ljust(str_len) + "=> " + final_procs[-1].mtype_short() + "_bx_out_vld,\n"
string_fwblock_inst += (" " + final_procs[-1].mtype_short() + "_done").ljust(str_len) + "=> " + final_procs[-1].mtype_short() + "_done,\n"
if final_procs[-1].mtype_short().startswith("FT"):
if final_procs[-1].mtype_short().startswith("TB"):
for final_proc in final_procs :
string_fwblock_inst += (" " + final_proc.inst + "_last_track").ljust(str_len) + "=> " + final_proc.inst + "_last_track,\n"
string_fwblock_inst += (" " + final_proc.inst + "_last_track_vld").ljust(str_len) + "=> " + final_proc.inst + "_last_track_vld,\n"
Expand Down Expand Up @@ -1643,7 +1643,7 @@ def writeProcBXPort(modName,isInput,isInitial,first_of_type,delay):
else:
if first_of_type and not ("VMSMER" in modName or "PC" in modName):
bx_str += " bx_o_V => "+modName.split("_")[0]+"_bx_out,\n"
if ("FT_" in modName) or ("TP_" in modName):
if ("TB_" in modName) or ("TP_" in modName):
bx_str += " bx_o_V_ap_vld => "+modName.split("_")[0]+"_bx_out_vld,\n"
else:
bx_str += " bx_o_V_ap_vld => open,\n"
Expand Down
16 changes: 0 additions & 16 deletions bodge/TF_D1D2_tb_writer.vhd.bodge

This file was deleted.

15 changes: 0 additions & 15 deletions bodge/TF_D3D4_tb_writer.vhd.bodge

This file was deleted.

15 changes: 0 additions & 15 deletions bodge/TF_L1D1_tb_writer.vhd.bodge

This file was deleted.

15 changes: 0 additions & 15 deletions bodge/TF_L1L2_tb_writer.vhd.bodge

This file was deleted.

15 changes: 0 additions & 15 deletions bodge/TF_L2D1_tb_writer.vhd.bodge

This file was deleted.

15 changes: 0 additions & 15 deletions bodge/TF_L2L3_tb_writer.vhd.bodge

This file was deleted.

15 changes: 0 additions & 15 deletions bodge/TF_L3L4_tb_writer.vhd.bodge

This file was deleted.

15 changes: 0 additions & 15 deletions bodge/TF_L5L6_tb_writer.vhd.bodge

This file was deleted.

6 changes: 0 additions & 6 deletions bodge/TF_tb_constants.vhd.bodge

This file was deleted.

32 changes: 20 additions & 12 deletions generator_hdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,27 @@ def writeTBMemoryWrites(memDict, memInfoDict, notfinal_procs,split, MPARdict):

if memInfo.isFIFO:
string_tmp = writeTBMemoryWriteFIFOInstance(mtypeB, memDict, proc)
# A bodge for TrackBuilder to write TF concatenated track+stub data.
# Code for TrackBuilder to write TF concatenated track+stub data.
# (Needed to compare with emData/).
if mtypeB == 'TW_104':
if mtypeB == 'TW_113':
for m in memDict[mtypeB]:
memName = m.inst
seed = memName[-4:]
fileTF = open("bodge/TF_" + seed + "_tb_writer.vhd.bodge")
string_tmp += fileTF.read();
fileTF.close()

string_tmp += "-- Clode for TrackBuilder to write TF concatenated track+stub data.\n";
string_tmp += "-- (Needed to compare with emData/).\n";
string_tmp += "writeTF_"+seed+"_634 : entity work.FileWriterFIFO\n";
string_tmp += "generic map (\n";
string_tmp += " FILE_NAME => FILE_OUT_TF&\""+seed+"\"&outputFileNameEnding,\n";
string_tmp += " FIFO_WIDTH => 634\n";
string_tmp += ")\n";
string_tmp += "port map (\n";
string_tmp += " CLK => CLK,\n"
string_tmp += " DONE => TB_DONE,\n";
string_tmp += " WRITE_EN => (TW_"+seed+"_stream_A_write and TW_"+seed+"_stream_AV_din(112)),\n";
string_tmp += " FULL_NEG => TW_"+seed+"_stream_A_full_neg,\n";
string_tmp += " DATA => TW_"+seed+"_stream_AV_din&BW_"+seed+"_L1_stream_AV_din&BW_"+seed+"_L2_stream_AV_din&BW_"+seed+"_L3_stream_AV_din&BW_"+seed+"_L4_stream_AV_din&BW_"+seed+"_L5_stream_AV_din&BW_"+seed+"_L6_stream_AV_din&DW_"+seed+"_D1_stream_AV_din&DW_"+seed+"_D2_stream_AV_din&DW_"+seed+"_D3_stream_AV_din&DW_"+seed+"_D4_stream_AV_din&DW_"+seed+"_D5_stream_AV_din\n";
string_tmp += ");\n";

if memInfo.is_final:
if memInfo.isFIFO:
string_final += string_tmp
Expand Down Expand Up @@ -355,12 +366,9 @@ def writeTestBench(tbfunc, topfunc, process_list, memDict, memInfoDict, memPrint
string_header += writeTBOpener(tbfunc)

string_constants = writeTBConstants(memDict, memInfoDict, notfinal_procs+[final_procs[-1].mtype_short()], memPrintsDir, sector, split)
# A bodge for TrackBuilder to write TF concatenated track+stub data.
# (Needed to compare with emData/).
if 'TW_104' in memInfoDict.keys():
fileTF = open("bodge/TF_tb_constants.vhd.bodge")
string_constants += fileTF.read();

if 'TW_113' in memInfoDict.keys():
string_constants += 'constant FILE_OUT_TF : string := dataOutDir&"TF_";';

string_ctrl_signals = writeTBControlSignals(memDict, memInfoDict, initial_proc, final_procs, notfinal_procs,split, MPARdict)

string_begin = writeTBEntityBegin()
Expand Down
Loading