mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-05 13:56:04 +00:00
Gowin. Handle the WRITE_MODE.
Process the WRITE_MODE in the GW5A series in a more concise manner. You can check it in the same way as in https://github.com/YosysHQ/yosys/pull/5440 Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
parent
f5c9e122de
commit
221874ba4b
4 changed files with 9 additions and 75 deletions
|
|
@ -10,6 +10,5 @@ $(eval $(call add_share_file,share/gowin,techlibs/gowin/arith_map.v))
|
||||||
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_map.v))
|
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_map.v))
|
||||||
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_map_gw5a.v))
|
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_map_gw5a.v))
|
||||||
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams.txt))
|
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams.txt))
|
||||||
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_gw5a.txt))
|
|
||||||
$(eval $(call add_share_file,share/gowin,techlibs/gowin/lutrams_map.v))
|
$(eval $(call add_share_file,share/gowin,techlibs/gowin/lutrams_map.v))
|
||||||
$(eval $(call add_share_file,share/gowin,techlibs/gowin/lutrams.txt))
|
$(eval $(call add_share_file,share/gowin,techlibs/gowin/lutrams.txt))
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,12 @@ ram block $__GOWIN_SP_ {
|
||||||
portoption "WRITE_MODE" 1 {
|
portoption "WRITE_MODE" 1 {
|
||||||
rdwr new;
|
rdwr new;
|
||||||
}
|
}
|
||||||
|
ifndef gw5a {
|
||||||
portoption "WRITE_MODE" 2 {
|
portoption "WRITE_MODE" 2 {
|
||||||
rdwr old;
|
rdwr old;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ram block $__GOWIN_DP_ {
|
ram block $__GOWIN_DP_ {
|
||||||
|
|
@ -46,10 +48,12 @@ ram block $__GOWIN_DP_ {
|
||||||
portoption "WRITE_MODE" 1 {
|
portoption "WRITE_MODE" 1 {
|
||||||
rdwr new;
|
rdwr new;
|
||||||
}
|
}
|
||||||
|
ifndef gw5a {
|
||||||
portoption "WRITE_MODE" 2 {
|
portoption "WRITE_MODE" 2 {
|
||||||
rdwr old;
|
rdwr old;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ram block $__GOWIN_SDP_ {
|
ram block $__GOWIN_SDP_ {
|
||||||
|
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
ram block $__GOWIN_SP_ {
|
|
||||||
abits 14;
|
|
||||||
widths 1 2 4 9 18 36 per_port;
|
|
||||||
cost 128;
|
|
||||||
init no_undef;
|
|
||||||
port srsw "A" {
|
|
||||||
clock posedge;
|
|
||||||
clken;
|
|
||||||
option "RESET_MODE" "SYNC" {
|
|
||||||
rdsrst zero ungated;
|
|
||||||
}
|
|
||||||
option "RESET_MODE" "ASYNC" {
|
|
||||||
rdarst zero;
|
|
||||||
}
|
|
||||||
rdinit zero;
|
|
||||||
portoption "WRITE_MODE" 0 {
|
|
||||||
rdwr no_change;
|
|
||||||
}
|
|
||||||
portoption "WRITE_MODE" 1 {
|
|
||||||
rdwr new;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ram block $__GOWIN_DP_ {
|
|
||||||
abits 14;
|
|
||||||
widths 1 2 4 9 18 per_port;
|
|
||||||
cost 128;
|
|
||||||
init no_undef;
|
|
||||||
port srsw "A" "B" {
|
|
||||||
clock posedge;
|
|
||||||
clken;
|
|
||||||
option "RESET_MODE" "SYNC" {
|
|
||||||
rdsrst zero ungated;
|
|
||||||
}
|
|
||||||
option "RESET_MODE" "ASYNC" {
|
|
||||||
rdarst zero;
|
|
||||||
}
|
|
||||||
rdinit zero;
|
|
||||||
portoption "WRITE_MODE" 0 {
|
|
||||||
rdwr no_change;
|
|
||||||
}
|
|
||||||
portoption "WRITE_MODE" 1 {
|
|
||||||
rdwr new;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ram block $__GOWIN_SDP_ {
|
|
||||||
abits 14;
|
|
||||||
widths 1 2 4 9 18 36 per_port;
|
|
||||||
cost 128;
|
|
||||||
init no_undef;
|
|
||||||
port sr "R" {
|
|
||||||
clock posedge;
|
|
||||||
clken;
|
|
||||||
option "RESET_MODE" "SYNC" {
|
|
||||||
rdsrst zero ungated;
|
|
||||||
}
|
|
||||||
option "RESET_MODE" "ASYNC" {
|
|
||||||
rdarst zero;
|
|
||||||
}
|
|
||||||
rdinit zero;
|
|
||||||
}
|
|
||||||
port sw "W" {
|
|
||||||
clock posedge;
|
|
||||||
clken;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -263,7 +263,7 @@ struct SynthGowinPass : public ScriptPass
|
||||||
if (nolutram)
|
if (nolutram)
|
||||||
args += " -no-auto-distributed";
|
args += " -no-auto-distributed";
|
||||||
}
|
}
|
||||||
run(stringf("memory_libmap -lib +/gowin/lutrams.txt -lib +/gowin/brams%s.txt", family == "gw5a" ? "_gw5a" : "") + args, "(-no-auto-block if -nobram, -no-auto-distributed if -nolutram)");
|
run(stringf("memory_libmap -lib +/gowin/lutrams.txt -lib +/gowin/brams.txt -D %s", family) + args, "(-no-auto-block if -nobram, -no-auto-distributed if -nolutram)");
|
||||||
run(stringf("techmap -map +/gowin/lutrams_map.v -map +/gowin/brams_map%s.v", family == "gw5a" ? "_gw5a" : ""));
|
run(stringf("techmap -map +/gowin/lutrams_map.v -map +/gowin/brams_map%s.v", family == "gw5a" ? "_gw5a" : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue