Skip to content

Commit 4351a9a

Browse files
committed
Documentation fixes and renamed quartus_workflow.py to just workflow.py
1 parent a94b66d commit 4351a9a

File tree

7 files changed

+178
-94
lines changed

7 files changed

+178
-94
lines changed

autogen_quartus.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import logging
44

55
from quartus.workflow_config import WorkflowConfig
6-
from quartus.quartus_workflow import execute_quartus_workflow
6+
from quartus.workflow import execute_quartus_workflow
77

88

99
def main(inputFilename, working_dir, log_to_file=False):
@@ -17,6 +17,7 @@ def main(inputFilename, working_dir, log_to_file=False):
1717
finally:
1818
logger.info("exit")
1919

20+
2021
def init_logging(debugLevel, log_to_file=False):
2122
logger = logging.getLogger('autogen_quartus')
2223

@@ -34,10 +35,9 @@ def init_logging(debugLevel, log_to_file=False):
3435
logger.setLevel(debugLevel)
3536
return logger
3637

38+
3739
def parseargs():
38-
"""
39-
Parse commandline input arguments.
40-
"""
40+
"""Parse commandline input arguments."""
4141
parser = argparse.ArgumentParser(
4242
description="Executes the quartus workflow, from creating a system to compiling the project made around that system")
4343
parser.add_argument('-j', '--json',

device_drivers/gen_makefile.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
import argparse
2424

2525
def create_kbuild(path, model_name):
26-
"""
27-
Create Kbuild file for kernel module compilation.
26+
"""Create Kbuild file for kernel module compilation.
2827
2928
This creates a minimal Kbuild file so we can build our
3029
autogenerated kernel modules. Our kernel modules rely on
@@ -50,8 +49,7 @@ def create_kbuild(path, model_name):
5049

5150

5251
def create_makefile(path):
53-
"""
54-
Create Makefile for kernel module compilation.
52+
"""Create Makefile for kernel module compilation.
5553
5654
This function writes the Makefile to the kernel module directory.
5755
@@ -76,9 +74,7 @@ def create_makefile(path):
7674

7775

7876
def parseargs():
79-
"""
80-
Parse commandline input arguments.
81-
"""
77+
"""Parse commandline input arguments."""
8278
parser = argparse.ArgumentParser(description=\
8379
"Generate files used for building kernel modules.")
8480
parser.add_argument('path',
@@ -91,8 +87,7 @@ def parseargs():
9187

9288
# NOTE: path MUST contain a trailing slash so this code can be platform independent
9389
def main(path, model_name):
94-
"""
95-
Run the program and build files needed for building a kernel module
90+
"""Run the program and build files needed for building a kernel module.
9691
9792
Inputs:
9893
path = path, including trailing slash, to the kernel module location

ipcore/create_hw_tcl.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,7 @@ def create_source_connection_point(dataplane_config):
261261

262262

263263
def parseargs():
264-
"""
265-
Parse commandline input arguments.
266-
"""
264+
"""Parse commandline input arguments."""
267265
parser = argparse.ArgumentParser(
268266
description="Generates a Platform Design/Qsys component as _hw.tcl file")
269267
parser.add_argument('-c', '--config',

quartus/quartus_templates.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,19 @@
5555
"""
5656

5757

58-
class quartus_templates:
58+
class QuartusTemplates:
59+
"""Generate templates for Quartus workflow."""
5960

6061
def __init__(self, num_custom_components, baseAddress):
62+
"""Initialize QuartusTemplates.
63+
64+
Parameters
65+
----------
66+
num_custom_components : [type]
67+
[description]
68+
baseAddress : [type]
69+
[description]
70+
"""
6171
self.custom_components_added = 0
6272
self.num_custom_components = num_custom_components
6373
self.de10_components_base_address = 20 # Format is 0x0020

quartus/target.py

+21-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
"""This module provides tuples to describe target configurations of quartus_workflow.
2+
3+
* Target tuple to define information needed about a target
4+
* Audiomini instance of Target tuple to describe the target configuration for a DE-10 Nano with an Audiomini
5+
* Audioblade instance of Target tuple to describe the configuration for an Audioblade
6+
"""
17
import collections
28

39
Target = collections.namedtuple('Target',
@@ -6,19 +12,19 @@
612
'axi_master_name', 'audio_in', 'audio_out', 'clock_name', 'top_level_vhdl_file'])
713

814
Audiomini = Target(name='audiomini', system_name='audiomini_system', device_family='Cyclone V',
9-
device='5CSEBA6U23I7', base_qsys_file='soc_base_system.qsys', base_proj_tcl_file='audiomini_proj.tcl',
10-
files_list=['Audiomini.vhd',
11-
'audiomini_system/synthesis/audiomini_system.qip'],
12-
top_level_vhdl_file='Audiomini.vhd', original_system='soc_system', base_address='20', axi_master_name='hps.h2f_lw_axi_master',
13-
audio_in='FE_Qsys_AD1939_Audio_Mini_v1_0.Line_In', audio_out='FE_Qsys_AD1939_Audio_Mini_v1_0.Headphone_Out',
14-
clock_name='clk_hps'
15-
)
16-
15+
device='5CSEBA6U23I7', base_qsys_file='soc_base_system.qsys', base_proj_tcl_file='audiomini_proj.tcl',
16+
files_list=['Audiomini.vhd',
17+
'audiomini_system/synthesis/audiomini_system.qip'],
18+
top_level_vhdl_file='Audiomini.vhd', original_system='soc_system', base_address='20', axi_master_name='hps.h2f_lw_axi_master',
19+
audio_in='FE_Qsys_AD1939_Audio_Mini_v1_0.Line_In', audio_out='FE_Qsys_AD1939_Audio_Mini_v1_0.Headphone_Out',
20+
clock_name='clk_hps'
21+
)
22+
1723
Audioblade = Target(name='audioblade', system_name='audioblade_system', device_family='Arria 10',
18-
device='10AS066H2F34I1HG', base_qsys_file='som_system.qsys', base_proj_tcl_file='audioblade_proj.tcl',
19-
files_list=['A10SoM_System.vhd',
20-
'audioblade_system/audioblade_system.qip', 'pll.qsys'],
21-
top_level_vhdl_file='A10SoM_System.vhd', original_system='som_system', base_address='20',
22-
axi_master_name='arria10_hps_0.h2f_lw_axi_master', audio_in='FE_Qsys_AD1939_Audio_Research_v1_0.Line_In',
23-
audio_out='FE_Qsys_AD1939_Audio_Research_v1_0.Headphone_Out', clock_name='clk_1'
24-
)
24+
device='10AS066H2F34I1HG', base_qsys_file='som_system.qsys', base_proj_tcl_file='audioblade_proj.tcl',
25+
files_list=['A10SoM_System.vhd',
26+
'audioblade_system/audioblade_system.qip', 'pll.qsys'],
27+
top_level_vhdl_file='A10SoM_System.vhd', original_system='som_system', base_address='20',
28+
axi_master_name='arria10_hps_0.h2f_lw_axi_master', audio_in='FE_Qsys_AD1939_Audio_Research_v1_0.Line_In',
29+
audio_out='FE_Qsys_AD1939_Audio_Research_v1_0.Headphone_Out', clock_name='clk_1'
30+
)

0 commit comments

Comments
 (0)