Skip to content

Commit 3956f10

Browse files
yrabbitRavenslofty
authored andcommitted
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 #5440 Signed-off-by: YRabbit <[email protected]>
1 parent f5c9e12 commit 3956f10

File tree

4 files changed

+9
-75
lines changed

4 files changed

+9
-75
lines changed

techlibs/gowin/Makefile.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ $(eval $(call add_share_file,share/gowin,techlibs/gowin/arith_map.v))
1010
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_map.v))
1111
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_map_gw5a.v))
1212
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams.txt))
13-
$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_gw5a.txt))
1413
$(eval $(call add_share_file,share/gowin,techlibs/gowin/lutrams_map.v))
1514
$(eval $(call add_share_file,share/gowin,techlibs/gowin/lutrams.txt))

techlibs/gowin/brams.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ ram block $__GOWIN_SP_ {
1919
portoption "WRITE_MODE" 1 {
2020
rdwr new;
2121
}
22-
portoption "WRITE_MODE" 2 {
23-
rdwr old;
22+
ifndef gw5a {
23+
portoption "WRITE_MODE" 2 {
24+
rdwr old;
25+
}
2426
}
2527
}
2628
}
@@ -46,8 +48,10 @@ ram block $__GOWIN_DP_ {
4648
portoption "WRITE_MODE" 1 {
4749
rdwr new;
4850
}
49-
portoption "WRITE_MODE" 2 {
50-
rdwr old;
51+
ifndef gw5a {
52+
portoption "WRITE_MODE" 2 {
53+
rdwr old;
54+
}
5155
}
5256
}
5357
}

techlibs/gowin/brams_gw5a.txt

Lines changed: 0 additions & 69 deletions
This file was deleted.

techlibs/gowin/synth_gowin.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ struct SynthGowinPass : public ScriptPass
263263
if (nolutram)
264264
args += " -no-auto-distributed";
265265
}
266-
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)");
266+
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)");
267267
run(stringf("techmap -map +/gowin/lutrams_map.v -map +/gowin/brams_map%s.v", family == "gw5a" ? "_gw5a" : ""));
268268
}
269269

0 commit comments

Comments
 (0)