Add DelayInfo struct
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
d56e29c47e
commit
3b0d1beabb
@ -52,7 +52,7 @@ struct NetInfo
|
|||||||
dict<IdString, std::string> attrs;
|
dict<IdString, std::string> attrs;
|
||||||
|
|
||||||
// wire -> (uphill_wire, delay)
|
// wire -> (uphill_wire, delay)
|
||||||
dict<WireId, std::pair<WireId, float>> wires;
|
dict<WireId, std::pair<WireId, DelayInfo>> wires;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum PortType
|
enum PortType
|
||||||
|
10
dummy/chip.h
10
dummy/chip.h
@ -22,6 +22,14 @@
|
|||||||
#ifndef CHIP_H
|
#ifndef CHIP_H
|
||||||
#define CHIP_H
|
#define CHIP_H
|
||||||
|
|
||||||
|
struct DelayInfo
|
||||||
|
{
|
||||||
|
float delay = 0;
|
||||||
|
|
||||||
|
float raiseDelay() { return delay; }
|
||||||
|
float fallDelay() { return delay; }
|
||||||
|
};
|
||||||
|
|
||||||
typedef IdString BelType;
|
typedef IdString BelType;
|
||||||
typedef IdString PortPin;
|
typedef IdString PortPin;
|
||||||
|
|
||||||
@ -111,7 +119,7 @@ struct WireRange
|
|||||||
struct WireDelay
|
struct WireDelay
|
||||||
{
|
{
|
||||||
WireId wire;
|
WireId wire;
|
||||||
float delay;
|
DelayInfo delay;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WireDelayIterator
|
struct WireDelayIterator
|
||||||
|
12
ice40/chip.h
12
ice40/chip.h
@ -22,6 +22,14 @@
|
|||||||
#ifndef CHIP_H
|
#ifndef CHIP_H
|
||||||
#define CHIP_H
|
#define CHIP_H
|
||||||
|
|
||||||
|
struct DelayInfo
|
||||||
|
{
|
||||||
|
float delay = 0;
|
||||||
|
|
||||||
|
float raiseDelay() { return delay; }
|
||||||
|
float fallDelay() { return delay; }
|
||||||
|
};
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
enum BelType
|
enum BelType
|
||||||
@ -175,7 +183,7 @@ struct AllWiresRange
|
|||||||
struct WireDelay
|
struct WireDelay
|
||||||
{
|
{
|
||||||
WireId wire;
|
WireId wire;
|
||||||
float delay;
|
DelayInfo delay;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WireDelayIterator
|
struct WireDelayIterator
|
||||||
@ -188,7 +196,7 @@ struct WireDelayIterator
|
|||||||
WireDelay operator*() const {
|
WireDelay operator*() const {
|
||||||
WireDelay ret;
|
WireDelay ret;
|
||||||
ret.wire.index = ptr->wire_index;
|
ret.wire.index = ptr->wire_index;
|
||||||
ret.delay = ptr->delay;
|
ret.delay.delay = ptr->delay;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user