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
46e8171a
Commit
46e8171a
authored
Jun 06, 2019
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor: do not use modules_pool.
parent
ed6e9881
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
40 deletions
+10
-40
__main__.py
hdlmake/__main__.py
+5
-3
action.py
hdlmake/action/action.py
+5
-0
module_pool.py
hdlmake/module_pool.py
+0
-37
No files found.
hdlmake/__main__.py
View file @
46e8171a
...
...
@@ -29,7 +29,7 @@ import sys
import
logging
from
.manifest_parser
import
ManifestParser
from
.
module_pool
import
ModulePool
from
.
action.core
import
ActionCore
from
._version
import
__version__
...
...
@@ -53,10 +53,12 @@ def hdlmake(args):
try
:
# Create a ModulePool object, this will become our workspace
modules_pool
=
ModulePool
(
options
)
action
=
ActionCore
(
options
)
action
.
load_top_module
()
action
.
run
()
# Execute the appropriated action for the freshly created modules pool
_action_runner
(
modules_pool
)
_action_runner
(
action
)
except
Exception
as
e
:
import
traceback
logging
.
error
(
e
)
...
...
hdlmake/action/action.py
View file @
46e8171a
...
...
@@ -70,11 +70,16 @@ class Action(list):
self
.
_deps_solved
=
False
self
.
options
=
options
set_logging_level
(
options
)
def
load_top_module
(
self
):
# Top level module.
self
.
new_module
(
parent
=
None
,
url
=
os
.
getcwd
(),
source
=
None
,
fetchto
=
"."
)
self
.
config
=
self
.
_get_config_dict
()
def
run
(
self
):
action
=
self
.
config
.
get
(
"action"
)
if
action
==
None
:
self
.
tool
=
None
...
...
hdlmake/module_pool.py
deleted
100644 → 0
View file @
ed6e9881
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013-2016 CERN
# Author: Pawel Szostek (pawel.szostek@cern.ch)
# Garcia-Lasheras (javier@garcialasheras.com)
#
# This file is part of Hdlmake.
#
# Hdlmake is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Hdlmake is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
#
"""This is the Python module providing the container for the HDL Modules"""
from
.action
import
ActionCore
,
ActionTree
class
ModulePool
(
ActionCore
,
ActionTree
):
"""
The ModulePool class acts as the container for the HDLMake modules that
are progressively being added to the design hierarchy.
"""
def
__init__
(
self
,
*
args
):
ActionCore
.
__init__
(
self
,
*
args
)
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