Skip to content

Commit c4340ab

Browse files
committed
Improved Libero programming support
1 parent 113f78d commit c4340ab

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

pyfpga/libero.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def _configure(self):
2121
self.conf['tool'] = tool
2222
self.conf['make_cmd'] = f'{tool} SCRIPT:{tool}.tcl'
2323
self.conf['make_ext'] = 'tcl'
24-
self.conf['prog_bit'] = 'pdd'
25-
self.conf['prog_cmd'] = f'{tool} SCRIPT:{tool}-prog.tcl'
24+
self.conf['prog_bit'] = 'ppd'
25+
self.conf['prog_cmd'] = f'FPExpress SCRIPT:{tool}-prog.tcl'
2626
self.conf['prog_ext'] = 'tcl'
2727

2828
def _make_custom(self):

pyfpga/templates/libero-prog.jinja

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
#
77
#}
88

9-
if { [catch {open_project {{ project }}/{{ project }}.prjx} ] } {
10-
open_project {{ project }}.prjx
11-
}
12-
run_tool -name {PROGRAMDEVICE}
9+
file delete -force -- libero-prog
10+
new_project -name libero -location libero-prog -mode single
11+
12+
set_programming_file -file {{ bitstream }}
13+
set_programming_action -action {PROGRAM}
14+
15+
run_selected_actions

pyfpga/templates/libero.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ run_tool -name {VERIFYTIMING}
113113
{% if hooks %}{{ hooks.prebit | join('\n') }}{% endif %}
114114

115115
run_tool -name {GENERATEPROGRAMMINGFILE}
116+
catch { file copy -force {{ project }}/designer/{{ top }}/{{ top }}.ppd {{ project }}.ppd }
116117

117118
{% if hooks %}{{ hooks.postbit | join('\n') }}{% endif %}
118119

0 commit comments

Comments
 (0)