Skip to content

Commit

Permalink
Document tool options for ghdl, icarus, icestorm, ise and isim
Browse files Browse the repository at this point in the history
  • Loading branch information
olofk committed Feb 22, 2019
1 parent 86e3964 commit 89e05c7
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 0 deletions.
13 changes: 13 additions & 0 deletions edalize/ghdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ class Ghdl(Edatool):
'run_options' : 'String'}}
argtypes = ['vlogparam']

@classmethod
def get_doc(cls, api_ver):
if api_ver == 0:
return {'description' : cls._description,
'lists' : [
{'name' : 'analyze_options',
'type' : 'String',
'desc' : 'Options to use for the analyze (ghdl -a) phase'},
{'name' : 'run_options',
'type' : 'String',
'desc' : 'Options to use for the run (ghdl -r) phase'},
]}

def configure_main(self):
(src_files, incdirs) = self._get_fileset_files()
# ghdl does not support mixing incompatible versions
Expand Down
15 changes: 15 additions & 0 deletions edalize/icarus.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

class Icarus(Edatool):

_description = "Icarus Verilog is a Verilog simulation and synthesis tool. It operates as a compiler, compiling source code written in Verilog (IEEE-1364) into some target format"
tool_options = {
'members' : {'timescale' : 'String'},
'lists' : {'iverilog_options' : 'String'}
Expand Down Expand Up @@ -39,6 +40,20 @@ class Icarus(Edatool):
$(RM) {name}.vpi
"""

@classmethod
def get_doc(cls, api_ver):
if api_ver == 0:
return {'description' : cls._description,
'members' : [
{'name' : 'timescale',
'type' : 'String',
'desc' : 'Default timescale'}],
'lists' : [
{'name' : 'iverilog_options',
'type' : 'String',
'desc' : 'Additional options for iverilog'},
]}

def configure_main(self):
f = open(os.path.join(self.work_root, self.name+'.scr'),'w')

Expand Down
20 changes: 20 additions & 0 deletions edalize/icestorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ class Icestorm(Edatool):

argtypes = ['vlogdefine', 'vlogparam']

@classmethod
def get_doc(cls, api_ver):
if api_ver == 0:
return {'description' : cls._description,
'members' : [
{'name' : 'pnr',
'type' : 'String',
'desc' : 'Select Place & Route tool. Legal values are *arachne* for Arachne-PNR or *next* for nextpnr. Default is arachne'}],
'lists' : [
{'name' : 'arachne_pnr_options',
'type' : 'String',
'desc' : 'Additional options for Arachnhe PNR'},
{'name' : 'nextpnr_options',
'type' : 'String',
'desc' : 'Additional options for nextpnr'},
{'name' : 'yosys_synth_options',
'type' : 'String',
'desc' : 'Additional options for the synth_ice40 command'},
]}

def configure_main(self):
# Write yosys script file
(src_files, incdirs) = self._get_fileset_files()
Expand Down
20 changes: 20 additions & 0 deletions edalize/ise.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

class Ise(Edatool):

_description = "Xilinx ISE Design Suite"
tool_options = {'members' : {'family' : 'String',
'device' : 'String',
'package' : 'String',
Expand Down Expand Up @@ -62,6 +63,25 @@ class Ise(Edatool):
quit
"""

@classmethod
def get_doc(cls, api_ver):
if api_ver == 0:
return {'description' : cls._description,
'members' : [
{'name' : 'family',
'type' : 'String',
'desc' : 'FPGA family (e.g. spartan6)'},
{'name' : 'device',
'type' : 'String',
'desc' : 'FPGA device (e.g. xc6slx45)'},
{'name' : 'package',
'type' : 'String',
'desc' : 'FPGA package (e.g. csg324)'},
{'name' : 'speed',
'type' : 'String',
'desc' : 'FPGA speed grade (e.g. -2)'},
]}

def configure_main(self):
for i in ['family', 'device', 'package', 'speed']:
if not i in self.tool_options:
Expand Down
13 changes: 13 additions & 0 deletions edalize/isim.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

class Isim(Edatool):

_description = "Xilinx ISim simulator from ISE design suite"
tool_options = {'lists' : {'fuse_options' : 'String',
'isim_options' : 'String'}}

Expand Down Expand Up @@ -47,6 +48,18 @@ class Isim(Edatool):
quit
"""

@classmethod
def get_doc(cls, api_ver):
if api_ver == 0:
return {'description' : cls._description,
'lists' : [
{'name' : 'fuse_options',
'type' : 'String',
'desc' : 'Additional options for compilation with FUSE'},
{'name' : 'isim_options',
'type' : 'String',
'desc' : 'Additional run options for ISim'},
]}
def configure_main(self):
#Check if any VPI modules are present and display warning
if len(self.vpi_modules) > 0:
Expand Down

0 comments on commit 89e05c7

Please sign in to comment.