Skip to content

Commit

Permalink
fix ifndefs
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonfan393 committed Nov 22, 2023
1 parent 462e9f1 commit aa94d95
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
16 changes: 8 additions & 8 deletions TrackletAlgorithm/TrackletCalculator_calculate_LXD1.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const ap_uint<11> addr_drinv = dr & 2047; // address for the LUT

if (Seed == TF::L1D1){
if (negDisk){
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<19> LUT_drinv[2048];
readSWLUT<ap_int<19>,2048>(LUT_drinv, "../../../../../emData/LUTs/TC_L1B1_drinv.tab",false,true);
#else
Expand All @@ -102,7 +102,7 @@ if (Seed == TF::L1D1){
drinv = LUT_drinv[addr_drinv];
}
else{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<19> LUT_drinv[2048];
readSWLUT<ap_int<19>,2048>(LUT_drinv, "../../../../../emData/LUTs/TC_L1F1_drinv.tab",false,true);
#else
Expand All @@ -117,7 +117,7 @@ if (Seed == TF::L1D1){
}
else{
if (negDisk){
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<19> LUT_drinv[2048];
readSWLUT<ap_int<19>,2048>(LUT_drinv, "../../../../../emData/LUTs/TC_L2B1_drinv.tab",false,true);
#else
Expand All @@ -130,7 +130,7 @@ else{
drinv = LUT_drinv[addr_drinv];
}
else{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<19> LUT_drinv[2048];
readSWLUT<ap_int<19>,2048>(LUT_drinv, "../../../../../emData/LUTs/TC_L2F1_drinv.tab",false,true);
#else
Expand Down Expand Up @@ -1002,7 +1002,7 @@ const ap_uint<11> addr_invt = (t_final>>1) & 2047; // address for the LUT
ap_int<18> invt;
if (Seed==TF::L1D1){
if (negDisk){
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_invt[2048];
readSWLUT<ap_int<18>,2048>(LUT_invt, "../../../../../emData/LUTs/TC_L1B1_invt.tab",false,true);
#else
Expand All @@ -1015,7 +1015,7 @@ if (Seed==TF::L1D1){
invt = LUT_invt[addr_invt];
}
else{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_invt[2048];
readSWLUT<ap_int<18>,2048>(LUT_invt, "../../../../../emData/LUTs/TC_L1F1_invt.tab",false,true);
#else
Expand All @@ -1030,7 +1030,7 @@ if (Seed==TF::L1D1){
}
else{
if (negDisk){
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_invt[2048];
readSWLUT<ap_int<18>,2048>(LUT_invt, "../../../../../emData/LUTs/TC_L2B1_invt.tab",false,true);
#else
Expand All @@ -1043,7 +1043,7 @@ else{
invt = LUT_invt[addr_invt];
}
else{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_invt[2048];
readSWLUT<ap_int<18>,2048>(LUT_invt, "../../../../../emData/LUTs/TC_L2F1_invt.tab",false,true);
#else
Expand Down
16 changes: 8 additions & 8 deletions TrackletAlgorithm/TrackletCalculator_calculate_LXLY.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ap_int<18> drinv;
switch (Seed) {
case TF::L1L2:
{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_drinv[512];
readSWLUT<ap_int<18>,512>(LUT_drinv, "../../../../../emData/LUTs/TC_L1L2_drinv.tab",false,true);
#else
Expand All @@ -100,7 +100,7 @@ switch (Seed) {
}
case TF::L2L3:
{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_drinv[512];
readSWLUT<ap_int<18>,512>(LUT_drinv, "../../../../../emData/LUTs/TC_L2L3_drinv.tab",false,true);
#else
Expand All @@ -116,7 +116,7 @@ switch (Seed) {

case TF::L3L4:
{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_drinv[512];
readSWLUT<ap_int<18>,512>(LUT_drinv, "../../../../../emData/LUTs/TC_L3L4_drinv.tab",false,true);
#else
Expand All @@ -131,7 +131,7 @@ switch (Seed) {
}
case TF::L5L6:
{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_drinv[512];
readSWLUT<ap_int<18>,512>(LUT_drinv, "../../../../../emData/LUTs/TC_L5L6_drinv.tab",false,true);
#else
Expand Down Expand Up @@ -1142,7 +1142,7 @@ ap_int<18> invt;
switch (Seed) {
case TF::L1L2:
{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_invt[4096];
readSWLUT<ap_int<18>,4096>(LUT_invt, "../../../../../emData/LUTs/TC_L1L2_invt.tab",false,true);
#else
Expand All @@ -1157,7 +1157,7 @@ switch (Seed) {
}
case TF::L2L3:
{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_invt[4096];
readSWLUT<ap_int<18>,4096>(LUT_invt, "../../../../../emData/LUTs/TC_L2L3_invt.tab",false,true);
#else
Expand All @@ -1173,7 +1173,7 @@ switch (Seed) {

case TF::L3L4:
{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_invt[4096];
readSWLUT<ap_int<18>,4096>(LUT_invt, "../../../../../emData/LUTs/TC_L3L4_invt.tab",false,true);
#else
Expand All @@ -1188,7 +1188,7 @@ switch (Seed) {
}
case TF::L5L6:
{
#if __SYNTHESIS__
#ifndef __SYNTHESIS__
static ap_int<18> LUT_invt[4096];
readSWLUT<ap_int<18>,4096>(LUT_invt, "../../../../../emData/LUTs/TC_L5L6_invt.tab",false,true);
#else
Expand Down
2 changes: 2 additions & 0 deletions emData/generate_TP.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ class ProjoutIndexDisk(Enum):
"#ifndef TopFunctions_TrackletProcessor_parameters_h\n"
"#define TopFunctions_TrackletProcessor_parameters_h\n"
"\n"
"#ifndef __SYNTHESIS__\n"
'#include "SWLUTReader.h"\n'
"#endif\n"
"// This file contains numbers of memories and bit masks that are specific to\n"
"// each TrackletProcessor and that come directly from the wiring.\n"
"//\n"
Expand Down

0 comments on commit aa94d95

Please sign in to comment.