@@ -34,6 +34,16 @@ using namespace DeviceResources;
34
34
using namespace LogicalNetlist ;
35
35
using namespace capnp ;
36
36
37
+ /* *
38
+ * @brief The FPGA interchange timing model includes three different corners (min, typ and max) for each of the two
39
+ * speed_models (slow and fast).
40
+ *
41
+ * Timing data can be found on PIPs, nodes, site pins and bel pins.
42
+ * This function retrieves the timing value based on the wanted speed model and the wanted corner.
43
+ *
44
+ * More information on the FPGA Interchange timing model can be found here:
45
+ * - https://github.com/chipsalliance/fpga-interchange-schema/blob/main/interchange/DeviceResources.capnp
46
+ */
37
47
static float get_corner_value (Device::CornerModel::Reader model, const char * speed_model, const char * value) {
38
48
bool slow_model = std::string (speed_model) == std::string (" slow" );
39
49
bool fast_model = std::string (speed_model) == std::string (" fast" );
@@ -250,10 +260,16 @@ struct ArchReader {
250
260
251
261
grid_def.grid_type = GridDefType::FIXED;
252
262
std::string name = std::string (ar_.getName ());
263
+
253
264
if (name == " auto" ) {
265
+ // At the moment, the interchange specifies fixed-layout only architectures,
266
+ // and allowing for auto-sizing could potentially be implemented later on
267
+ // to allow for experimentation on new architectures.
268
+ // For the time being the layout is restricted to be only fixed.
254
269
archfpga_throw (arch_file_, __LINE__,
255
270
" The name auto is reserved for auto-size layouts; please choose another name" );
256
271
}
272
+
257
273
grid_def.name = name;
258
274
for (auto tile : tileList) {
259
275
t_metadata_dict data;
@@ -287,6 +303,9 @@ struct ArchReader {
287
303
*
288
304
* As the interchange format develops further, with possibly more details, this function can
289
305
* become dynamic, allowing for different parameters for the different architectures.
306
+ *
307
+ * FIXME: This will require to be dynamically assigned, and a suitable representation added
308
+ * to the FPGA interchange device schema.
290
309
*/
291
310
arch_->R_minW_nmos = 6065.520020 ;
292
311
arch_->R_minW_pmos = 18138.500000 ;
@@ -362,6 +381,7 @@ struct ArchReader {
362
381
std::string mux_type_string = entry.first ? " mux_" : " passGate_" ;
363
382
name << mux_type_string;
364
383
384
+ // FIXME: allow to dynamically choose different speed models and corners
365
385
R = get_corner_value (model.getOutputResistance (), " slow" , " min" );
366
386
name << " R" << std::scientific << R;
367
387
@@ -437,6 +457,10 @@ struct ArchReader {
437
457
arch_->Segments [index ].Rmetal = 0 ;
438
458
arch_->Segments [index ].Cmetal = 0 ;
439
459
arch_->Segments [index ].parallel_axis = BOTH_AXIS;
460
+
461
+ // TODO: Only bi-directional segments are created, but it the interchange format
462
+ // has directionality information on PIPs, which may be used to infer the
463
+ // segments' directonality.
440
464
arch_->Segments [index ].directionality = BI_DIRECTIONAL;
441
465
arch_->Segments [index ].arch_wire_switch = 1 ;
442
466
arch_->Segments [index ].arch_opin_switch = 1 ;
0 commit comments