Comments (4)
We have just gotten an external parallel build working using bluetcl and make. The working bits in the end were very simple.
First, we have a bluetcl script that generates a dependency graph of make rules thusly:
foreach i
[depend make $topfile] {
set tgt [lindex $i 0]
set deps [join [lindex $i 1]]
puts [append tgt ": " $deps]
}
Then the following rule can build any %bo in the design, along with any verilog modules that have been delineated using synthesis boundaries.
%.bo:
bsc -verilog $(BSC_COMPILATION_FLAGS) -p $(BSC_PATH) $<
Given that this seems to be rather trivial, one would imagine that implementing this behaviour by default in the compiler would not be too difficult.
Having said that it is trivial, it should be noted that this took 2 of us most of a week to arrive at, and there are a large number of people using a much less efficient build (which was developed by the Bluespec company, no less!) so it would be much appreciated if this behaviour was integrated and enabled with a flag.
from bsc.
@jonwoodruff where can I checkout your external parallel build environment? I would like to use it for some of my projects.
from bsc.
@neelgala You can find the build we're using in:
https://github.com/CTSRD-CHERI/Toooba/tree/CHERI/builds/Resources
genDependencies.tcl is the one that asks the bluespec compiler to return a dependency graph structure, and then generates makefile rules. This one takes flags that should be passed to the Bluespec build in environment variables. There is a rule in Include_verilator.mk that invokes this script to generate the makefile include with these dependencies. The rules from Include_verilator.mk are below:
.depends.mk: $(REPO)/builds/Resources/genDependencies.tcl build_dir
$(info generating bsv dependency graph)
BSC_PATH=$(BSC_PATH) \
BSC_DEFINES="$(BSC_DEFINES)" \
BSC_BUILDDIR=build_dir \
BSC_TOPFILE=$(REPO)/src_Testbench/Top/Top_HW_Side.bsv \
OUTPUTFILE=$@ \
$<
include .depends.mk
%.bo:
$(info building $@)
bsc -verilog -elab -bdir build_dir -vdir Verilog_RTL $(BSC_COMPILATION_FLAGS) -p $(BSC_PATH) $<
Sorry for the delay! We've been testing things before we merged it into our main branch.
from bsc.
Hi all,
It sounds like this is no longer a pressing issue for us, at the moment. The Bluetcl-generated makefile is doing the job, so I'll close the issue.
Of course, it still might be useful to have a parallel build feature inside the compiler itself, and I'm still interested hear anyone's feedback on that idea. So please feel free to reopen.
from bsc.
Related Issues (20)
- Using HLint
- SizeOf (in type of method with if-expression) remains after expanded (causing internal error) HOT 10
- STP_STUB option leads to build failure HOT 4
- Using the TEST_BSC_OPTIONS option leads to obvious testsuite failure
- YICES_STUB option leads to build failure HOT 3
- Properly support "enabled_when_ready" attribute for methods
- round robin not working in PAClib's unordered if-then-else HOT 1
- for make install-src i got this error can anyone help for this HOT 7
- The arg_names pragma for methods does not check length (in classic).
- Improve BH's module import to have more features like BSV's import-BVI
- Support a "clocked_by" syntax in BH module instantiations
- i got several error onthe installation process HOT 4
- Nondeterminism in ISyntax definition order
- bs classic: struct update syntax of struct from `import qualified` gives error for the wrong file. HOT 2
- Better distinguish between qualified imports and sub-imports
- assertion checks should have knowledge of rwire/creg internals HOT 5
- consider a name different from "core" inside the bin directory
- Support superclasses with (dependent) type variables not in the base typeclass HOT 2
- Any way to get the RDY signal for a method? HOT 7
- Method with internal input-dependent "if" mistakenly scheduled as SBR to self HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bsc.