Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
d8233b71
Commit
d8233b71
authored
Mar 30, 2019
by
Javier D. Garcia-Lasheras
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quit upon error should generate an error code different than 0
parent
4c8d351c
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
22 additions
and
22 deletions
+22
-22
__main__.py
hdlmake/__main__.py
+1
-1
action.py
hdlmake/action/action.py
+1
-1
core.py
hdlmake/action/core.py
+1
-1
tree.py
hdlmake/action/tree.py
+3
-3
configparser.py
hdlmake/manifest_parser/configparser.py
+2
-2
variables.py
hdlmake/manifest_parser/variables.py
+2
-2
content.py
hdlmake/module/content.py
+1
-1
core.py
hdlmake/module/core.py
+1
-1
module.py
hdlmake/module/module.py
+1
-1
srcfile.py
hdlmake/srcfile.py
+1
-1
isim.py
hdlmake/tools/isim.py
+1
-1
makefile_writer.py
hdlmake/tools/makefile_writer.py
+2
-2
quartus.py
hdlmake/tools/quartus.py
+3
-3
shell.py
hdlmake/util/shell.py
+1
-1
vlog_parser.py
hdlmake/vlog_parser.py
+1
-1
No files found.
hdlmake/__main__.py
View file @
d8233b71
...
...
@@ -62,7 +62,7 @@ def _action_runner(modules_pool):
options
=
modules_pool
.
options
if
options
.
command
==
"manifest-help"
:
ManifestParser
()
.
print_help
()
quit
()
quit
(
0
)
elif
options
.
command
==
"makefile"
:
modules_pool
.
makefile
()
elif
options
.
command
==
"fetch"
:
...
...
hdlmake/action/action.py
View file @
d8233b71
...
...
@@ -93,7 +93,7 @@ class Action(list):
self
.
top_entity
=
self
.
config
.
get
(
"syn_top"
)
else
:
logging
.
error
(
"Unknown requested action:
%
s"
,
action
)
quit
()
quit
(
1
)
def
new_module
(
self
,
parent
,
url
,
source
,
fetchto
):
"""Add new module to the pool.
...
...
hdlmake/action/core.py
View file @
d8233b71
...
...
@@ -56,7 +56,7 @@ class ActionCore(Action):
"The following modules remains unfetched:
\n
"
"
%
s"
,
"
\n
"
.
join
([
str
(
m
)
for
m
in
self
if
not
m
.
isfetched
]))
quit
()
quit
(
1
)
def
makefile
(
self
):
"""Write the Makefile for the current design"""
self
.
_check_all_fetched
()
...
...
hdlmake/action/tree.py
View file @
d8233b71
...
...
@@ -45,7 +45,7 @@ class ActionTree(Action):
from
networkx.readwrite
import
json_graph
except
ImportError
as
error_import
:
logging
.
error
(
error_import
)
quit
()
quit
(
1
)
if
self
.
options
.
mode
==
'dfs'
:
hierarchy
=
nx
.
dfs_tree
(
hierarchy
,
top_id
)
elif
self
.
options
.
mode
==
'bfs'
:
...
...
@@ -62,7 +62,7 @@ class ActionTree(Action):
import
networkx
as
nx
except
ImportError
as
error_import
:
logging
.
error
(
error_import
)
quit
()
quit
(
1
)
unfetched_modules
=
False
hierarchy
=
nx
.
DiGraph
()
...
...
@@ -117,7 +117,7 @@ class ActionTree(Action):
else
:
logging
.
error
(
'Unknown tree mode:
%
s'
,
self
.
options
.
mode
)
quit
()
quit
(
1
)
if
unfetched_modules
:
logging
.
warning
(
"Some of the modules have not been fetched!"
)
...
...
hdlmake/manifest_parser/configparser.py
View file @
d8233b71
...
...
@@ -311,12 +311,12 @@ types:[<type 'int'>]
logging
.
error
(
"Invalid syntax in the manifest file "
+
self
.
config_file
+
":
\n
"
+
str
(
error_syntax
))
logging
.
error
(
content
)
quit
()
quit
(
1
)
except
SystemExit
as
error_exit
:
logging
.
error
(
"Exit requested by the manifest file "
+
self
.
config_file
+
":
\n
"
+
str
(
error_exit
))
logging
.
error
(
content
)
quit
()
quit
(
1
)
except
:
logging
.
error
(
"Encountered unexpected error while parsing "
+
self
.
config_file
)
...
...
hdlmake/manifest_parser/variables.py
View file @
d8233b71
...
...
@@ -280,7 +280,7 @@ class ManifestParser(ConfigParser):
"Both manifest.py and Manifest.py"
+
"found in the module directory:
%
s"
,
path
)
quit
()
quit
(
1
)
for
filename
in
dir_files
:
if
filename
==
"manifest.py"
or
filename
==
"Manifest.py"
:
if
not
os
.
path
.
isdir
(
filename
):
...
...
@@ -297,7 +297,7 @@ class ManifestParser(ConfigParser):
manifest
=
_search_for_manifest
(
path
)
if
manifest
is
None
:
logging
.
error
(
"No manifest found in path:
%
s"
,
path
)
quit
()
quit
(
1
)
else
:
logging
.
debug
(
"Parse manifest in:
%
s"
,
manifest
)
return
self
.
add_config_file
(
manifest
)
...
...
hdlmake/module/content.py
View file @
d8233b71
...
...
@@ -102,7 +102,7 @@ class ModuleContent(ModuleCore):
if
path_mod
.
is_abs_path
(
path
):
logging
.
error
(
"Found an absolute path ("
+
path
+
") in a manifest("
+
self
.
path
+
")"
)
quit
()
quit
(
1
)
path
=
path_mod
.
rel2abs
(
path
,
self
.
path
)
local_mods
.
append
(
self
.
pool
.
new_module
(
parent
=
self
,
url
=
path
,
...
...
hdlmake/module/core.py
View file @
d8233b71
...
...
@@ -78,7 +78,7 @@ class ModuleConfig(object):
logging
.
error
(
"Path to the local module doesn't exist:
\n
"
+
url
+
"
\n
This module was instantiated in: "
+
str
(
self
.
parent
))
quit
()
quit
(
1
)
self
.
path
=
path_mod
.
relpath
(
url
)
self
.
isfetched
=
True
...
...
hdlmake/module/module.py
View file @
d8233b71
...
...
@@ -169,7 +169,7 @@ PARSE START: %s
logging
.
error
(
"Error while parsing {0}:
\n
{1}: {2}."
.
format
(
self
.
path
,
type
(
name_error
),
name_error
))
quit
()
quit
(
1
)
self
.
manifest_dict
=
opt_map
else
:
self
.
manifest_dict
=
{}
...
...
hdlmake/srcfile.py
View file @
d8233b71
...
...
@@ -438,5 +438,5 @@ def create_source_file(path, module, library=None,
else
:
logging
.
error
(
"Cannot create source file
%
s, "
"unknown file extension
%
s"
,
path
,
extension
)
quit
()
quit
(
1
)
return
new_file
hdlmake/tools/isim.py
View file @
d8233b71
...
...
@@ -76,7 +76,7 @@ class ToolISim(ToolSim):
self
.
manifest_dict
[
"sim_path"
],
".."
,
".."
))
else
:
logging
.
error
(
"Cannot calculate xilinx tools base directory"
)
quit
()
quit
(
1
)
hdl_language
=
'vhdl'
# 'verilog'
if
shell
.
check_windows
():
os_prefix
=
'nt'
...
...
hdlmake/tools/makefile_writer.py
View file @
d8233b71
...
...
@@ -26,7 +26,7 @@ def load_syn_tool(tool_name):
else
:
logging
.
error
(
"Unknown synthesis tool:
%
s"
,
tool_name
)
logging
.
error
(
" Supported synthesis tools are
%
s"
,
available_tools
.
keys
())
quit
()
quit
(
1
)
def
load_sim_tool
(
tool_name
):
...
...
@@ -52,4 +52,4 @@ def load_sim_tool(tool_name):
else
:
logging
.
error
(
"Unknown simulation tool:
%
s"
,
tool_name
)
logging
.
error
(
" Supported simulation tools are
%
s"
,
available_tools
.
keys
())
quit
()
quit
(
1
)
hdlmake/tools/quartus.py
View file @
d8233b71
...
...
@@ -213,7 +213,7 @@ class ToolQuartus(ToolSyn):
logging
.
error
(
"quartus_preflow file listed in "
+
os
.
getcwd
()
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
quit
(
1
)
preflow
=
'"'
+
'quartus_sh:'
+
path
+
'"'
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name_type'
:
'PRE_FLOW_SCRIPT_FILE'
,
...
...
@@ -226,7 +226,7 @@ class ToolQuartus(ToolSyn):
logging
.
error
(
"quartus_postmodule file listed in "
+
os
.
getcwd
()
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
quit
(
1
)
postmodule
=
'"'
+
'quartus_sh:'
+
path
+
'"'
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name_type'
:
'POST_MODULE_SCRIPT_FILE'
,
...
...
@@ -238,7 +238,7 @@ class ToolQuartus(ToolSyn):
logging
.
error
(
"quartus_postflow file listed in "
+
os
.
getcwd
()
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
quit
(
1
)
postflow
=
'"'
+
'quartus_sh:'
+
path
+
'"'
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name_type'
:
'POST_FLOW_SCRIPT_FILE'
,
...
...
hdlmake/util/shell.py
View file @
d8233b71
...
...
@@ -47,7 +47,7 @@ def run(command):
except
CalledProcessError
as
process_error
:
logging
.
error
(
"Cannot execute the shell command:
%
s"
,
process_error
.
output
)
quit
()
quit
(
1
)
def
tclpath
(
path
):
...
...
hdlmake/vlog_parser.py
View file @
d8233b71
...
...
@@ -136,7 +136,7 @@ class VerilogPreprocessor(object):
params
=
[]
if
name
in
self
.
vpp_keywords
:
logging
.
error
(
"Attempt to `define a reserved preprocessor keyword"
)
quit
()
quit
(
1
)
mdef
=
self
.
VLDefine
(
name
,
params
,
expansion
)
self
.
vpp_macros
.
append
(
mdef
)
return
mdef
...
...
Javier D. Garcia-Lasheras
@garcialasheras
mentioned in issue
#21 (closed)
·
Mar 30, 2019
mentioned in issue
#21 (closed)
mentioned in issue #21
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment