-
Notifications
You must be signed in to change notification settings - Fork 418
Add support for falling edge clocking #2211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
638a476
00c53c0
b9d570d
af81901
b4af78f
c653664
f1089f7
4253fac
560e5ee
a82d8d4
a1f7c54
725bc6b
9033994
c1004c1
4df34e1
55c6c47
04cb06c
2653d83
76b9203
b63083b
b26fbaa
5e4a8f6
c28d73b
9e566eb
b0adc09
b592f23
5d297ec
b177df7
c1b127c
9a0467f
5b47ceb
2a4f193
079efe0
ab19fee
2353564
e0a3b93
362821a
0ce6545
5c76fcb
7f9c9b0
d859ec3
de3857d
977b9d6
3e4cd85
91369c9
ebfaea8
4649f0f
cb46900
50fe438
9996637
f6e7fea
e947026
4ed6e5a
aa0561b
c59f504
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,10 +42,15 @@ class TimingConstraints { | |
///\returns The name of a clock domain | ||
std::string clock_domain_name(const DomainId id) const; | ||
|
||
///Checks whether the clock domain was marked as inverted. Inverted clocks are virtual clocks created from netlist clocks with 180 degree phase shift applied | ||
///\param id The ID of the clock domain | ||
///\returns whether the clock domain with specified domain id was marked as inverted | ||
bool clock_domain_inverted(const DomainId id) const; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a comment saying what this does (can be short, but should explain what an inverted clock implies). Should be doxygen style, like the rest of the comments in this file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
|
||
///\returns The source NodeId of the specified domain | ||
NodeId clock_domain_source_node(const DomainId id) const; | ||
|
||
//\returns whether the specified domain id corresponds to a virtual lcock | ||
//\returns whether the specified domain id corresponds to a virtual clock | ||
bool is_virtual_clock(const DomainId id) const; | ||
|
||
///\returns The domain of the specified node id if it is a clock source | ||
|
@@ -123,6 +128,7 @@ class TimingConstraints { | |
public: //Mutators | ||
///\returns The DomainId of the clock with the specified name (will be created if it doesn not exist) | ||
DomainId create_clock_domain(const std::string name); | ||
DomainId create_clock_domain(const std::string name, bool inverted); | ||
|
||
///Sets the setup constraint between src_domain and sink_domain with value constraint | ||
void set_setup_constraint(const DomainId src_domain, const DomainId sink_domain, const Time constraint); | ||
|
@@ -170,6 +176,7 @@ class TimingConstraints { | |
private: //Data | ||
tatum::util::linear_map<DomainId,DomainId> domain_ids_; | ||
tatum::util::linear_map<DomainId,std::string> domain_names_; | ||
tatum::util::linear_map<DomainId, bool> domain_inverted_; | ||
tatum::util::linear_map<DomainId,NodeId> domain_sources_; | ||
|
||
std::unordered_set<NodeId> constant_generators_; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding @kmurray so he can take a look.
Is this creating a half cycle clock transfer from -edge to +edge?
Would be good to comment that. Also possibly we should be using launch and capture edge terminology (or active edge) as rise_edge = fall_edge is a bit mysterious looking. So consider some variable renaming. We should at least comment it very thoroughly!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments describing the inversion. I'm not sure if renaming
rise_edge
andfall_edge
fromsdcparse::CreateClock
is necessary because those precisely describe the waveform of the clock.I also slightly modified the 180 degree phase shift.