@@ -4646,7 +4646,7 @@ static void ProcessClocks(pugi::xml_node Parent, t_clock_arch* clocks, const pug
4646
4646
static void ProcessNoc (pugi::xml_node noc_tag, t_arch* arch, const pugiutil::loc_data& loc_data)
4647
4647
{
4648
4648
// a vector representing all the possible attributes within the noc tag
4649
- std::vector<std::string> expected_noc_attributes = {" link_bandwidth" , " link_latency" , " router_latency" };
4649
+ std::vector<std::string> expected_noc_attributes = {" link_bandwidth" , " link_latency" , " router_latency" , " noc_router_tile_name " };
4650
4650
4651
4651
std::vector<std::string> expected_noc_children_tags = {" mesh" ," topology" };
4652
4652
@@ -4656,6 +4656,9 @@ static void ProcessNoc(pugi::xml_node noc_tag, t_arch* arch, const pugiutil::loc
4656
4656
// identifier that lets us know when we could not properly convert an attribute value to a integer
4657
4657
int attribute_conversion_failure = -1 ;
4658
4658
4659
+ // identifier that lets us know when we could not properly convert a string conversion value
4660
+ std::string attribute_conversion_failure_string = " " ;
4661
+
4659
4662
// if we are here, then the user has a NoC in their architecture, so need to add it
4660
4663
arch->noc = new t_noc_inf;
4661
4664
t_noc_inf* noc_ref = arch->noc ;
@@ -4672,13 +4675,22 @@ static void ProcessNoc(pugi::xml_node noc_tag, t_arch* arch, const pugiutil::loc
4672
4675
4673
4676
noc_ref->router_latency = pugiutil::get_attribute (noc_tag, " router_latency" , loc_data, pugiutil::REQUIRED).as_int (attribute_conversion_failure);
4674
4677
4678
+ noc_ref->noc_router_tile_name = pugiutil::get_attribute (noc_tag, " noc_router_tile_name" , loc_data, pugiutil::REQUIRED).as_string ();
4679
+
4675
4680
// the noc parameters can only be non-zero positive values
4676
4681
if ((noc_ref->link_bandwidth < 0 ) || (noc_ref->link_latency < 0 ) || (noc_ref->router_latency < 0 ))
4677
4682
{
4678
4683
archfpga_throw (loc_data.filename_c_str (), loc_data.line (noc_tag),
4679
4684
" The link bandwidth, link latency and router latency for the NoC must be a positive non-zero integer." );
4680
4685
}
4681
4686
4687
+ // check that the router tile name was supplied properly
4688
+ if (!(noc_ref->noc_router_tile_name .compare (attribute_conversion_failure_string)))
4689
+ {
4690
+ archfpga_throw (loc_data.filename_c_str (), loc_data.line (noc_tag),
4691
+ " The noc router tile name must be a string." );
4692
+ }
4693
+
4682
4694
/* We processed the NoC node, so now process the topology*/
4683
4695
4684
4696
// make sure that only the topology tag is found under NoC
0 commit comments