Skip to content

Commit 99a7f2a

Browse files
Merge branch 'master' into 3d_track_to_track_conn
2 parents 4dac4a5 + 3feeff1 commit 99a7f2a

File tree

5 files changed

+44
-45
lines changed

5 files changed

+44
-45
lines changed

libs/librrgraph/src/io/gen/rr_graph_uxsdcxx.h

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* https://github.com/duck2/uxsdcxx
55
* Modify only if your build process doesn't involve regenerating this file.
66
*
7-
* Cmdline: uxsdcxx/uxsdcxx.py /home/amin/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
8-
* Input file: /home/amin/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
9-
* md5sum of input file: 8672cb3951993f7e0ea3433a02507672
7+
* Cmdline: uxsdcxx/uxsdcxx.py /home/sara/Desktop/RLPLACE_LOCAL/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
8+
* Input file: /home/sara/Desktop/RLPLACE_LOCAL/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
9+
* md5sum of input file: cf10a1fa99fdfc7a455393a2a3cd1426
1010
*/
1111

1212
#include <functional>
@@ -82,7 +82,7 @@ template <class T, typename Context>
8282
inline void load_block_types(const pugi::xml_node &root, T &out, Context &context, const std::function<void(const char*)> *report_error, ptrdiff_t *offset_debug);
8383
template <class T, typename Context>
8484
inline void load_grid_loc(const pugi::xml_node &root, T &out, Context &context, const std::function<void(const char*)> *report_error, ptrdiff_t *offset_debug);
85-
inline void load_grid_loc_required_attributes(const pugi::xml_node &root, int * block_type_id, int * height_offset, int * width_offset, int * x, int * y, int* layer, const std::function<void(const char*)> * report_error);
85+
inline void load_grid_loc_required_attributes(const pugi::xml_node &root, int * block_type_id, int * height_offset, int * layer, int * width_offset, int * x, int * y, const std::function<void(const char*)> * report_error);
8686
template <class T, typename Context>
8787
inline void load_grid_locs(const pugi::xml_node &root, T &out, Context &context, const std::function<void(const char*)> *report_error, ptrdiff_t *offset_debug);
8888
template <class T, typename Context>
@@ -269,8 +269,8 @@ constexpr const char *atok_lookup_t_block_type[] = {"height", "id", "name", "wid
269269
enum class gtok_t_block_types {BLOCK_TYPE};
270270
constexpr const char *gtok_lookup_t_block_types[] = {"block_type"};
271271

272-
enum class atok_t_grid_loc {BLOCK_TYPE_ID, HEIGHT_OFFSET, WIDTH_OFFSET, X, Y, LAYER};
273-
constexpr const char *atok_lookup_t_grid_loc[] = {"block_type_id", "height_offset", "width_offset", "x", "y", "layer"};
272+
enum class atok_t_grid_loc {BLOCK_TYPE_ID, HEIGHT_OFFSET, LAYER, WIDTH_OFFSET, X, Y};
273+
constexpr const char *atok_lookup_t_grid_loc[] = {"block_type_id", "height_offset", "layer", "width_offset", "x", "y"};
274274

275275
enum class gtok_t_grid_locs {GRID_LOC};
276276
constexpr const char *gtok_lookup_t_grid_locs[] = {"grid_loc"};
@@ -1015,21 +1015,19 @@ inline atok_t_grid_loc lex_attr_t_grid_loc(const char *in, const std::function<v
10151015
default: break;
10161016
}
10171017
break;
1018-
10191018
case 5:
10201019
switch(*((triehash_uu32*)&in[0])){
1021-
case onechar('l', 0, 32) | onechar('a', 8, 32) | onechar('y', 16, 32) | onechar('e', 24, 32):
1022-
switch(in[4]){
1023-
case onechar('r', 0, 8):
1024-
return atok_t_grid_loc::LAYER;
1025-
break;
1026-
default: break;
1027-
}
1020+
case onechar('l', 0, 32) | onechar('a', 8, 32) | onechar('y', 16, 32) | onechar('e', 24, 32):
1021+
switch(in[4]){
1022+
case onechar('r', 0, 8):
1023+
return atok_t_grid_loc::LAYER;
10281024
break;
1029-
default:break;
1025+
default: break;
1026+
}
1027+
break;
1028+
default: break;
10301029
}
10311030
break;
1032-
10331031
case 12:
10341032
switch(*((triehash_uu64*)&in[0])){
10351033
case onechar('w', 0, 64) | onechar('i', 8, 64) | onechar('d', 16, 64) | onechar('t', 24, 64) | onechar('h', 32, 64) | onechar('_', 40, 64) | onechar('o', 48, 64) | onechar('f', 56, 64):
@@ -2308,19 +2306,22 @@ inline void load_block_type_required_attributes(const pugi::xml_node &root, int
23082306
if(!test_astate.all()) attr_error(test_astate, atok_lookup_t_block_type, report_error);
23092307
}
23102308

2311-
inline void load_grid_loc_required_attributes(const pugi::xml_node &root, int * block_type_id, int * height_offset, int * width_offset, int * x, int * y, int* layer, const std::function<void(const char *)> * report_error){
2309+
inline void load_grid_loc_required_attributes(const pugi::xml_node &root, int * block_type_id, int * height_offset, int * layer, int * width_offset, int * x, int * y, const std::function<void(const char *)> * report_error){
23122310
std::bitset<6> astate = 0;
23132311
for(pugi::xml_attribute attr = root.first_attribute(); attr; attr = attr.next_attribute()){
23142312
atok_t_grid_loc in = lex_attr_t_grid_loc(attr.name(), report_error);
23152313
if(astate[(int)in] == 0) astate[(int)in] = 1;
23162314
else noreturn_report(report_error, ("Duplicate attribute " + std::string(attr.name()) + " in <grid_loc>.").c_str());
23172315
switch(in){
2318-
case atok_t_grid_loc::BLOCK_TYPE_ID:
2316+
case atok_t_grid_loc::BLOCK_TYPE_ID:
23192317
*block_type_id = load_int(attr.value(), report_error);
23202318
break;
23212319
case atok_t_grid_loc::HEIGHT_OFFSET:
23222320
*height_offset = load_int(attr.value(), report_error);
23232321
break;
2322+
case atok_t_grid_loc::LAYER:
2323+
*layer = load_int(attr.value(), report_error);
2324+
break;
23242325
case atok_t_grid_loc::WIDTH_OFFSET:
23252326
*width_offset = load_int(attr.value(), report_error);
23262327
break;
@@ -2330,8 +2331,6 @@ inline void load_grid_loc_required_attributes(const pugi::xml_node &root, int *
23302331
case atok_t_grid_loc::Y:
23312332
*y = load_int(attr.value(), report_error);
23322333
break;
2333-
case atok_t_grid_loc::LAYER:
2334-
*layer=load_int(attr.value(), report_error);
23352334
default: break; /* Not possible. */
23362335
}
23372336
}
@@ -3218,16 +3217,16 @@ inline void load_grid_locs(const pugi::xml_node &root, T &out, Context &context,
32183217
memset(&grid_loc_block_type_id, 0, sizeof(grid_loc_block_type_id));
32193218
int grid_loc_height_offset;
32203219
memset(&grid_loc_height_offset, 0, sizeof(grid_loc_height_offset));
3220+
int grid_loc_layer;
3221+
memset(&grid_loc_layer, 0, sizeof(grid_loc_layer));
32213222
int grid_loc_width_offset;
32223223
memset(&grid_loc_width_offset, 0, sizeof(grid_loc_width_offset));
32233224
int grid_loc_x;
32243225
memset(&grid_loc_x, 0, sizeof(grid_loc_x));
32253226
int grid_loc_y;
32263227
memset(&grid_loc_y, 0, sizeof(grid_loc_y));
3227-
int grid_loc_layer;
3228-
memset(&grid_loc_layer,0,sizeof(grid_loc_layer));
3229-
load_grid_loc_required_attributes(node, &grid_loc_block_type_id, &grid_loc_height_offset, &grid_loc_width_offset, &grid_loc_x, &grid_loc_y, &grid_loc_layer, report_error);
3230-
auto child_context = out.add_grid_locs_grid_loc(context, grid_loc_block_type_id, grid_loc_height_offset, grid_loc_width_offset, grid_loc_x, grid_loc_y, grid_loc_layer);
3228+
load_grid_loc_required_attributes(node, &grid_loc_block_type_id, &grid_loc_height_offset, &grid_loc_layer, &grid_loc_width_offset, &grid_loc_x, &grid_loc_y, report_error);
3229+
auto child_context = out.add_grid_locs_grid_loc(context, grid_loc_block_type_id, grid_loc_height_offset, grid_loc_layer, grid_loc_width_offset, grid_loc_x, grid_loc_y);
32313230
load_grid_loc(node, out, child_context, report_error, offset_debug);
32323231
out.finish_grid_locs_grid_loc(child_context);
32333232
}
@@ -3946,11 +3945,10 @@ inline void write_grid_locs(T &in, std::ostream &os, Context &context){
39463945
os << "<grid_loc";
39473946
os << " block_type_id=\"" << in.get_grid_loc_block_type_id(child_context) << "\"";
39483947
os << " height_offset=\"" << in.get_grid_loc_height_offset(child_context) << "\"";
3948+
os << " layer=\"" << in.get_grid_loc_layer(child_context) << "\"";
39493949
os << " width_offset=\"" << in.get_grid_loc_width_offset(child_context) << "\"";
39503950
os << " x=\"" << in.get_grid_loc_x(child_context) << "\"";
39513951
os << " y=\"" << in.get_grid_loc_y(child_context) << "\"";
3952-
os << " layer=\"" << in.get_grid_loc_layer(child_context) << "\"";
3953-
39543952
os << "/>\n";
39553953
}
39563954
}

libs/librrgraph/src/io/gen/rr_graph_uxsdcxx_capnp.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* https://github.com/duck2/uxsdcxx
55
* Modify only if your build process doesn't involve regenerating this file.
66
*
7-
* Cmdline: uxsdcxx/uxsdcap.py /home/amin/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
8-
* Input file: /home/amin/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
9-
* md5sum of input file: 8672cb3951993f7e0ea3433a02507672
7+
* Cmdline: uxsdcxx/uxsdcap.py /home/sara/Desktop/RLPLACE_LOCAL/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
8+
* Input file: /home/sara/Desktop/RLPLACE_LOCAL/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
9+
* md5sum of input file: cf10a1fa99fdfc7a455393a2a3cd1426
1010
*/
1111

1212
#include <functional>
@@ -687,7 +687,7 @@ inline void load_grid_locs_capnp_type(const ucap::GridLocs::Reader &root, T &out
687687
auto data = root.getGridLocs();
688688
out.preallocate_grid_locs_grid_loc(context, data.size());
689689
for(const auto & el : data) {
690-
auto child_context = out.add_grid_locs_grid_loc(context, el.getBlockTypeId(), el.getHeightOffset(), el.getWidthOffset(), el.getX(), el.getY(), el.getLayer());
690+
auto child_context = out.add_grid_locs_grid_loc(context, el.getBlockTypeId(), el.getHeightOffset(), el.getLayer(), el.getWidthOffset(), el.getX(), el.getY());
691691
load_grid_loc_capnp_type(el, out, child_context, report_error, stack);
692692
out.finish_grid_locs_grid_loc(child_context);
693693
stack->back().second += 1;
@@ -1117,6 +1117,7 @@ inline void write_grid_locs_capnp_type(T &in, ucap::GridLocs::Builder &root, Con
11171117
auto child_context = in.get_grid_locs_grid_loc(i, context);
11181118
grid_locs_grid_loc.setBlockTypeId(in.get_grid_loc_block_type_id(child_context));
11191119
grid_locs_grid_loc.setHeightOffset(in.get_grid_loc_height_offset(child_context));
1120+
grid_locs_grid_loc.setLayer(in.get_grid_loc_layer(child_context));
11201121
grid_locs_grid_loc.setWidthOffset(in.get_grid_loc_width_offset(child_context));
11211122
grid_locs_grid_loc.setX(in.get_grid_loc_x(child_context));
11221123
grid_locs_grid_loc.setY(in.get_grid_loc_y(child_context));

libs/librrgraph/src/io/gen/rr_graph_uxsdcxx_interface.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* https://github.com/duck2/uxsdcxx
55
* Modify only if your build process doesn't involve regenerating this file.
66
*
7-
* Cmdline: uxsdcxx/uxsdcxx.py /home/amin/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
8-
* Input file: /home/amin/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
9-
* md5sum of input file: 8672cb3951993f7e0ea3433a02507672
7+
* Cmdline: uxsdcxx/uxsdcxx.py /home/sara/Desktop/RLPLACE_LOCAL/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
8+
* Input file: /home/sara/Desktop/RLPLACE_LOCAL/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
9+
* md5sum of input file: cf10a1fa99fdfc7a455393a2a3cd1426
1010
*/
1111

1212
#include <functional>
@@ -330,20 +330,20 @@ class RrGraphBase {
330330

331331
/** Generated for complex type "grid_loc":
332332
* <xs:complexType name="grid_loc">
333+
* <xs:attribute name="layer" type="xs:int" use="required" />
333334
* <xs:attribute name="x" type="xs:int" use="required" />
334335
* <xs:attribute name="y" type="xs:int" use="required" />
335-
* <xs:attribute name="layer" type="xs:int" use=:"required" />
336336
* <xs:attribute name="block_type_id" type="xs:int" use="required" />
337337
* <xs:attribute name="width_offset" type="xs:int" use="required" />
338338
* <xs:attribute name="height_offset" type="xs:int" use="required" />
339339
* </xs:complexType>
340340
*/
341341
virtual inline int get_grid_loc_block_type_id(typename ContextTypes::GridLocReadContext &ctx) = 0;
342342
virtual inline int get_grid_loc_height_offset(typename ContextTypes::GridLocReadContext &ctx) = 0;
343+
virtual inline int get_grid_loc_layer(typename ContextTypes::GridLocReadContext &ctx) = 0;
343344
virtual inline int get_grid_loc_width_offset(typename ContextTypes::GridLocReadContext &ctx) = 0;
344345
virtual inline int get_grid_loc_x(typename ContextTypes::GridLocReadContext &ctx) = 0;
345346
virtual inline int get_grid_loc_y(typename ContextTypes::GridLocReadContext &ctx) = 0;
346-
virtual inline int get_grid_loc_layer(typename ContextTypes::GridLocReadContext &ctx) =0;
347347

348348
/** Generated for complex type "grid_locs":
349349
* <xs:complexType name="grid_locs">
@@ -353,7 +353,7 @@ class RrGraphBase {
353353
* </xs:complexType>
354354
*/
355355
virtual inline void preallocate_grid_locs_grid_loc(typename ContextTypes::GridLocsWriteContext &ctx, size_t size) = 0;
356-
virtual inline typename ContextTypes::GridLocWriteContext add_grid_locs_grid_loc(typename ContextTypes::GridLocsWriteContext &ctx, int block_type_id, int height_offset, int width_offset, int x, int y, int layer) = 0;
356+
virtual inline typename ContextTypes::GridLocWriteContext add_grid_locs_grid_loc(typename ContextTypes::GridLocsWriteContext &ctx, int block_type_id, int height_offset, int layer, int width_offset, int x, int y) = 0;
357357
virtual inline void finish_grid_locs_grid_loc(typename ContextTypes::GridLocWriteContext &ctx) = 0;
358358
virtual inline size_t num_grid_locs_grid_loc(typename ContextTypes::GridLocsReadContext &ctx) = 0;
359359
virtual inline typename ContextTypes::GridLocReadContext get_grid_locs_grid_loc(int n, typename ContextTypes::GridLocsReadContext &ctx) = 0;

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
15381538
grid_.grid_size(), size);
15391539
}
15401540
}
1541-
inline void* add_grid_locs_grid_loc(void*& /*ctx*/, int block_type_id, int height_offset, int width_offset, int x, int y, int layer) final {
1541+
inline void* add_grid_locs_grid_loc(void*& /*ctx*/, int block_type_id, int height_offset, int layer, int width_offset, int x, int y) final {
15421542
const auto& type = grid_.get_physical_type({x, y, layer});
15431543
int grid_width_offset = grid_.get_width_offset({x, y, layer});
15441544
int grid_height_offset = grid_.get_height_offset({x, y, layer});

libs/libvtrcapnproto/gen/rr_graph_uxsdcxx.capnp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# https://github.com/duck2/uxsdcxx
33
# Modify only if your build process doesn't involve regenerating this file.
44
#
5-
# Cmdline: uxsdcxx/uxsdcap.py /home/amin/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
6-
# Input file: /home/amin/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
7-
# md5sum of input file: 8672cb3951993f7e0ea3433a02507672
5+
# Cmdline: uxsdcxx/uxsdcap.py /home/sara/Desktop/RLPLACE_LOCAL/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
6+
# Input file: /home/sara/Desktop/RLPLACE_LOCAL/vtr-verilog-to-routing/libs/librrgraph/src/io/rr_graph.xsd
7+
# md5sum of input file: cf10a1fa99fdfc7a455393a2a3cd1426
88

9-
@0xe9a519eb0e454dd4;
9+
@0xe180df9b6ce517f5;
1010
using Cxx = import "/capnp/c++.capnp";
1111
$Cxx.namespace("ucap");
1212

@@ -151,10 +151,10 @@ struct BlockTypes {
151151
struct GridLoc {
152152
blockTypeId @0 :Int32;
153153
heightOffset @1 :Int32;
154-
widthOffset @2 :Int32;
155-
x @3 :Int32;
156-
y @4 :Int32;
157-
layer @5 : Int32;
154+
layer @2 :Int32;
155+
widthOffset @3 :Int32;
156+
x @4 :Int32;
157+
y @5 :Int32;
158158
}
159159

160160
struct GridLocs {

0 commit comments

Comments
 (0)