mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-14 14:55:26 +00:00
coolrunner2: Add extraction for TFFs
This commit is contained in:
parent
dd5fab69c1
commit
8fe9cdf364
3 changed files with 54 additions and 0 deletions
|
@ -149,6 +149,16 @@ struct SynthCoolrunner2Pass : public ScriptPass
|
|||
run("dfflibmap -prepare -liberty +/coolrunner2/xc2_dff.lib");
|
||||
}
|
||||
|
||||
if (check_label("map_tff"))
|
||||
{
|
||||
// This is quite hacky. By telling abc that it can only use AND and XOR gates, abc will try and use XOR
|
||||
// gates "whenever possible." This will hopefully cause toggle flip-flop structures to turn into an XOR
|
||||
// connected to a D flip-flop. We then match on these and convert them into XC2 TFF cells.
|
||||
run("abc -g AND,XOR");
|
||||
run("clean");
|
||||
run("extract -map +/coolrunner2/tff_extract.v");
|
||||
}
|
||||
|
||||
if (check_label("map_pla"))
|
||||
{
|
||||
run("abc -sop -I 40 -P 56");
|
||||
|
@ -160,6 +170,8 @@ struct SynthCoolrunner2Pass : public ScriptPass
|
|||
run("dfflibmap -liberty +/coolrunner2/xc2_dff.lib");
|
||||
run("dffinit -ff FDCP Q INIT");
|
||||
run("dffinit -ff FDCP_N Q INIT");
|
||||
run("dffinit -ff FTCP Q INIT");
|
||||
run("dffinit -ff FTCP_N Q INIT");
|
||||
run("dffinit -ff LDCP Q INIT");
|
||||
run("dffinit -ff LDCP_N Q INIT");
|
||||
run("coolrunner2_sop");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue