@@ -383,6 +383,22 @@ bool MakeNetlistNodes(
383
383
return false ;
384
384
}
385
385
386
+ // Special label remapping for counters!
387
+ // If a GP_COUNT8 asks for a pre-divider of 12, change the label to GP_COUNT8_X4INPUT
388
+ // TODO: see if any other pre-divider values are special?
389
+ // Note that GP_COUNT8_ADV always has a 4-bit input mux, as does a GP_COUNT14_ADV
390
+ // so no special casing needed for those
391
+ if (cell->m_type == " GP_COUNT8" )
392
+ {
393
+ // See if we have CLKIN_DIVIDE == 12
394
+ if (cell->m_parameters [" CLKIN_DIVIDE" ] == " 12" )
395
+ {
396
+ LogDebug (" Found CLKIN_DIVIDE = 12 on GP_COUNT8 instance %s, changing to GP_COUNT8_X4INPUT\n " ,
397
+ cell->m_name .c_str ());
398
+ label = ilmap[" GP_COUNT8_X4INPUT" ];
399
+ }
400
+ }
401
+
386
402
// Create a node for the cell
387
403
PARGraphNode* nnode = new PARGraphNode (label, cell);
388
404
cell->m_parnode = nnode;
@@ -551,7 +567,6 @@ void MakeDeviceNodes(
551
567
uint32_t count8_adv_label = AllocateLabel (ngraph, dgraph, lmap, " GP_COUNT8_ADV" );
552
568
uint32_t count14_label = AllocateLabel (ngraph, dgraph, lmap, " GP_COUNT14" );
553
569
uint32_t count14_adv_label = AllocateLabel (ngraph, dgraph, lmap, " GP_COUNT14_ADV" );
554
- uint32_t count14_x4input_label = AllocateLabel (ngraph, dgraph, lmap, " GP_COUNT14_X4INPUT" );
555
570
uint32_t count8_x4input_label = AllocateLabel (ngraph, dgraph, lmap, " GP_COUNT8_X4INPUT" );
556
571
for (unsigned int i=0 ; i<device->GetCounterCount (); i++)
557
572
{
@@ -570,7 +585,7 @@ void MakeDeviceNodes(
570
585
node->AddAlternateLabel (count8_label);
571
586
node->AddAlternateLabel (count14_label);
572
587
node->AddAlternateLabel (count8_x4input_label);
573
- node-> AddAlternateLabel (count14_x4input_label);
588
+ // There's no GP_COUNT14_X4INPUT because all GP_COUNT14_ADV cells have 4-bit input muxes
574
589
}
575
590
else
576
591
{
0 commit comments