diff options
Diffstat (limited to 'icebox/icebox_vlog.py')
-rwxr-xr-x | icebox/icebox_vlog.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/icebox/icebox_vlog.py b/icebox/icebox_vlog.py index a2c7950..74ac3d3 100755 --- a/icebox/icebox_vlog.py +++ b/icebox/icebox_vlog.py @@ -17,7 +17,7 @@ import icebox from icebox import re_match_cached, re_sub_cached, re_search_cached -import getopt, sys, re +import getopt, sys, re, os strip_comments = False strip_interconn = False @@ -34,7 +34,7 @@ modname = "chip" def usage(): print(""" -Usage: icebox_vlog [options] [bitmap.asc] +Usage: %s [options] [bitmap.asc] -s strip comments from output @@ -70,7 +70,7 @@ Usage: icebox_vlog [options] [bitmap.asc] -D enable exactly-one-driver checks -""") +""" % os.path.basename(sys.argv[0])) sys.exit(0) try: @@ -477,7 +477,10 @@ for pllid in ic.pll_list(): if plltype != "100": text_func.append(" .PLLOUT_SELECT_PORTA(\"%s\")," % get_pll_outsel(pllinfo, "PLLOUT_SELECT_A")) text_func.append(" .PLLOUT_SELECT_PORTB(\"%s\")," % get_pll_outsel(pllinfo, "PLLOUT_SELECT_B")) - text_func.append(" .SHIFTREG_DIV_MODE(1'b%s)," % get_pll_bit(pllinfo, "SHIFTREG_DIV_MODE")) + if ic.device == "5k": + text_func.append(" .SHIFTREG_DIV_MODE(2'b%s)," % get_pll_bits(pllinfo, "SHIFTREG_DIV_MODE", 2)) + else: + text_func.append(" .SHIFTREG_DIV_MODE(1'b%s)," % get_pll_bit(pllinfo, "SHIFTREG_DIV_MODE")) text_func.append(" .FDA_FEEDBACK(4'b%s)," % get_pll_bits(pllinfo, "FDA_FEEDBACK", 4)) text_func.append(" .FDA_RELATIVE(4'b%s)," % get_pll_bits(pllinfo, "FDA_RELATIVE", 4)) text_func.append(" .DIVR(4'b%s)," % get_pll_bits(pllinfo, "DIVR", 4)) |