From 5a5b9758347c22fce08a1bdbfae0cabdcede18d9 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Tue, 18 Jul 2023 15:04:31 +0800 Subject: [PATCH] scf_eda.proto --- scf_eda.pb-c.c | 19 ++++++++++++++++--- scf_eda.pb-c.h | 3 ++- scf_eda.proto | 17 +++++++++-------- ses_core.h | 28 +++++++++++++++++++++++++++- 4 files changed, 54 insertions(+), 13 deletions(-) diff --git a/scf_eda.pb-c.c b/scf_eda.pb-c.c index 1ccc932..f8da1c4 100644 --- a/scf_eda.pb-c.c +++ b/scf_eda.pb-c.c @@ -655,7 +655,7 @@ const ProtobufCMessageDescriptor scf_eline__descriptor = (ProtobufCMessageInit) scf_eline__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCFieldDescriptor scf_ecomponent__field_descriptors[8] = +static const ProtobufCFieldDescriptor scf_ecomponent__field_descriptors[9] = { { "id", @@ -753,6 +753,18 @@ static const ProtobufCFieldDescriptor scf_ecomponent__field_descriptors[8] = 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "vflag", + 9, + PROTOBUF_C_LABEL_REQUIRED, + PROTOBUF_C_TYPE_BOOL, + 0, /* quantifier_offset */ + offsetof(ScfEcomponent, vflag), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned scf_ecomponent__field_indices_by_name[] = { 2, /* field[2] = dfo */ @@ -760,6 +772,7 @@ static const unsigned scf_ecomponent__field_indices_by_name[] = { 0, /* field[0] = id */ 3, /* field[3] = pins */ 1, /* field[1] = type */ + 8, /* field[8] = vflag */ 6, /* field[6] = w */ 4, /* field[4] = x */ 5, /* field[5] = y */ @@ -767,7 +780,7 @@ static const unsigned scf_ecomponent__field_indices_by_name[] = { static const ProtobufCIntRange scf_ecomponent__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 8 } + { 0, 9 } }; const ProtobufCMessageDescriptor scf_ecomponent__descriptor = { @@ -777,7 +790,7 @@ const ProtobufCMessageDescriptor scf_ecomponent__descriptor = "ScfEcomponent", "", sizeof(ScfEcomponent), - 8, + 9, scf_ecomponent__field_descriptors, scf_ecomponent__field_indices_by_name, 1, scf_ecomponent__number_ranges, diff --git a/scf_eda.pb-c.h b/scf_eda.pb-c.h index 9d24182..8347fb4 100644 --- a/scf_eda.pb-c.h +++ b/scf_eda.pb-c.h @@ -101,10 +101,11 @@ struct _ScfEcomponent int32_t y; int32_t w; int32_t h; + protobuf_c_boolean vflag; }; #define SCF_ECOMPONENT__INIT \ { PROTOBUF_C_MESSAGE_INIT (&scf_ecomponent__descriptor) \ - , 0, 0, 0, 0,NULL, 0, 0, 0, 0 } + , 0, 0, 0, 0,NULL, 0, 0, 0, 0, 0 } struct _ScfEfunction diff --git a/scf_eda.proto b/scf_eda.proto index 9597056..07f4d95 100644 --- a/scf_eda.proto +++ b/scf_eda.proto @@ -38,15 +38,16 @@ message scf_eline message scf_ecomponent { - required uint64 id = 1; - required uint64 type = 2; - required int64 dfo = 3; - repeated scf_epin pins = 4; + required uint64 id = 1; + required uint64 type = 2; + required int64 dfo = 3; + repeated scf_epin pins = 4; - required int32 x = 5; - required int32 y = 6; - required int32 w = 7; - required int32 h = 8; + required int32 x = 5; + required int32 y = 6; + required int32 w = 7; + required int32 h = 8; + required bool vflag = 9; } message scf_efunction diff --git a/ses_core.h b/ses_core.h index c2f54c8..7a33ef4 100644 --- a/ses_core.h +++ b/ses_core.h @@ -4,6 +4,32 @@ #include"scf_eda_pb.h" #include"scf_vector.h" -int ses_layout_board(ScfEboard* b); +typedef struct ses_loop_s ses_loop_t; +typedef struct ses_edge_s ses_edge_t; +typedef struct ses_pin_s ses_pin_t; + +struct ses_edge_s +{ + ScfEcomponent* c0; + ScfEpin* p0; + + ScfEcomponent* c1; + ScfEpin* p1; +}; + +struct ses_pin_s +{ + ScfEcomponent* c; + ScfEpin* p; +}; + +struct ses_loop_s +{ + scf_vector_t* pins; +}; + +int ses_layout_board (ScfEboard* b); + +int ses_loop_function(ScfEfunction* f, scf_vector_t* loops); #endif -- 2.25.1