Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit 5a0daad

Browse files
authored
Timing improvements and preliminary support for CDCs (#77)
* Removed delay argument. * Removed regceb ports. * Use memory-specific start signals for sync_nent. * Added pipelines for BX signals to tf_merge_streamer blocks. * Added 360-MHz clock, currently unused.
1 parent 1920736 commit 5a0daad

3 files changed

Lines changed: 171 additions & 148 deletions

File tree

WriteHDLUtils.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ def parseProcFunction(proc_name, fname_def):
12131213
return arg_types_list, arg_names_list, templ_pars_list
12141214

12151215
def writeModuleInst_generic(module, hls_src_dir, f_writeTemplatePars,
1216-
f_matchArgPortNames, first_of_type, extraports,delay,split=0):
1216+
f_matchArgPortNames, first_of_type, extraports,split=0):
12171217
####
12181218
# function name
12191219

@@ -1234,7 +1234,7 @@ def writeModuleInst_generic(module, hls_src_dir, f_writeTemplatePars,
12341234
oneProcUpMem = mem
12351235
break
12361236
ports_added = (module.mtype in writeModuleInst_generic.modules_with_ports_added)
1237-
ctrl_wire_inst,ctrl_func_inst = writeStartSwitchAndInternalBX(module,oneProcUpMem,extraports or ports_added,delay, first_of_type)
1237+
ctrl_wire_inst,ctrl_func_inst = writeStartSwitchAndInternalBX(module,oneProcUpMem,extraports or ports_added,first_of_type)
12381238
str_ctrl_wire += ctrl_wire_inst
12391239
str_ctrl_func += ctrl_func_inst
12401240
writeModuleInst_generic.modules_with_ports_added.add(module.mtype)
@@ -1278,15 +1278,15 @@ def writeModuleInst_generic(module, hls_src_dir, f_writeTemplatePars,
12781278
for mem in module.upstreams:
12791279
if mem.bxbitwidth != 1 and mem.bxbitwidth != 2: continue #FIXME what is this doing
12801280
if mem.is_initial:
1281-
string_bx_in += writeProcBXPort(module.inst,True,True,first_of_type,delay)
1281+
string_bx_in += writeProcBXPort(module.inst,True,True,first_of_type)
12821282
break
12831283
else:
1284-
string_bx_in += writeProcBXPort(module.inst,True,False,first_of_type,delay)
1284+
string_bx_in += writeProcBXPort(module.inst,True,False,first_of_type)
12851285
break
12861286
elif argtype == "BXType&" or argtype == "BXType &": # Could change this in the HLS instead
12871287
#FIXME hack for PC and VMSMER
12881288
if first_of_type or module.mtype_short() == "PC" or module.mtype_short() == "VMSMER" :
1289-
string_bx_out += writeProcBXPort(module.inst,False,False,first_of_type, delay) # output bx
1289+
string_bx_out += writeProcBXPort(module.inst,False,False,first_of_type) # output bx
12901290
elif "table" in argname: # For TE
12911291
innerPS = ("_L1" in module.inst and "_L2" in module.inst) \
12921292
or ("_L2" in module.inst and "_L3" in module.inst) \
@@ -1415,81 +1415,81 @@ def writeModuleInst_generic(module, hls_src_dir, f_writeTemplatePars,
14151415
return str_ctrl_wire,module_str
14161416

14171417
################################
1418-
def writeModuleInstance(module, hls_src_dir, first_of_type, extraports, delay, split = 0):
1418+
def writeModuleInstance(module, hls_src_dir, first_of_type, extraports, split = 0):
14191419
if module.mtype == 'InputRouter':
14201420
return writeModuleInst_generic(module, hls_src_dir,
14211421
writeTemplatePars_IR,
14221422
matchArgPortNames_IR,
1423-
first_of_type, extraports, delay, split)
1423+
first_of_type, extraports, split)
14241424
elif module.mtype == 'VMRouter':
14251425
return writeModuleInst_generic(module, hls_src_dir,
14261426
writeTemplatePars_VMR,
14271427
matchArgPortNames_VMR,
1428-
first_of_type, extraports, delay, split)
1428+
first_of_type, extraports, split)
14291429
elif module.mtype == 'VMRouterCM':
14301430
return writeModuleInst_generic(module, hls_src_dir,
14311431
writeTemplatePars_VMRCM,
14321432
matchArgPortNames_VMRCM,
1433-
first_of_type, extraports, delay, split)
1433+
first_of_type, extraports, split)
14341434
elif module.mtype == 'TrackletEngine':
14351435
return writeModuleInst_generic(module, hls_src_dir,
14361436
writeTemplatePars_TE,
14371437
matchArgPortNames_TE,
1438-
first_of_type, extraports, delay, split)
1438+
first_of_type, extraports, split)
14391439
elif module.mtype == 'TrackletProcessor':
14401440
return writeModuleInst_generic(module, hls_src_dir,
14411441
writeTemplatePars_TP,
14421442
matchArgPortNames_TP,
1443-
first_of_type, extraports, delay, split)
1443+
first_of_type, extraports, split)
14441444
elif module.mtype == 'TrackletCalculator':
14451445
return writeModuleInst_generic(module, hls_src_dir,
14461446
writeTemplatePars_TC,
14471447
matchArgPortNames_TC,
1448-
first_of_type, extraports, delay, split)
1448+
first_of_type, extraports, split)
14491449
elif module.mtype == 'ProjectionRouter':
14501450
return writeModuleInst_generic(module, hls_src_dir,
14511451
writeTemplatePars_PR,
14521452
matchArgPortNames_PR,
1453-
first_of_type, extraports, delay, split)
1453+
first_of_type, extraports, split)
14541454
elif module.mtype == 'MatchEngine':
14551455
return writeModuleInst_generic(module, hls_src_dir,
14561456
writeTemplatePars_ME,
14571457
matchArgPortNames_ME,
1458-
first_of_type, extraports, delay, split)
1458+
first_of_type, extraports, split)
14591459
elif module.mtype == 'MatchCalculator':
14601460
return writeModuleInst_generic(module, hls_src_dir,
14611461
writeTemplatePars_MC,
14621462
matchArgPortNames_MC,
1463-
first_of_type, extraports, delay, split)
1463+
first_of_type, extraports, split)
14641464
elif module.mtype == 'MatchProcessor':
14651465
return writeModuleInst_generic(module, hls_src_dir,
14661466
writeTemplatePars_MP,
14671467
matchArgPortNames_MP,
1468-
first_of_type, extraports, delay, split)
1468+
first_of_type, extraports, split)
14691469
elif module.mtype == 'FitTrack':
14701470
return writeModuleInst_generic(module, hls_src_dir,
14711471
writeTemplatePars_FT,
14721472
matchArgPortNames_FT,
1473-
first_of_type, extraports, delay, split)
1473+
first_of_type, extraports, split)
14741474
elif module.mtype == 'TrackBuilder':
14751475
return writeModuleInst_generic(module, hls_src_dir,
14761476
writeTemplatePars_TB,
14771477
matchArgPortNames_TB,
1478-
first_of_type, extraports, delay, split)
1478+
first_of_type, extraports, split)
14791479
elif module.mtype == 'PurgeDuplicate':
14801480
return writeModuleInst_generic(module, hls_src_dir,
14811481
writeTemplatePars_PD,
14821482
matchArgPortNames_PD,
1483-
first_of_type, extraports, delay, split)
1483+
first_of_type, extraports, split)
14841484
elif module.mtype == 'ProjectionCalculator':
14851485
return writeModuleInst_generic(module, hls_src_dir,
14861486
writeTemplatePars_PC,
14871487
matchArgPortNames_PC,
1488-
first_of_type, extraports, delay, split)
1488+
first_of_type, extraports, split)
14891489
elif module.mtype == 'VMSMERouter':
14901490
return writeModuleInst_generic(module, hls_src_dir,
14911491
writeTemplatePars_VMSMER,
14921492
matchArgPortNames_VMSMER,
1493-
first_of_type, extraports, delay, split)
1493+
first_of_type, extraports, split)
14941494
else:
14951495
raise ValueError(module.mtype + " is unknown.")

0 commit comments

Comments
 (0)