I've written up an (informal) draft proposal for an FPGA project
structure that could be easily extended as the project grows and is
version control friendly. I'd be grateful for any type of feedback...
http://www.saardrimer.com/fpgaproj/
cheers,
saar.
First some minuta. The figures aren't labeled, so it's hard to target
comments for one. The first figure, "The 'flow'", doesn't have a
"Build Scripts" as a source file type. I realize you had planned to
make a distinction between scripts and source, but our build scripts
are checked into our repository under the Philosophy that any checkout
should be buildable as is, and we consider them part of our source.
Also, testbenches should make mention of Unit Testing in hardware -
it's automated and should be part of a mature build cycle. Scoping/
Tapping on the other hand is part of the development process so
doesn't necessarily need to be mentioned here.
I was in the study phase of implementing an SCons Builder/Scanner for
XST/VHDL for my build cycles. Requiring that VHDL files share the
entity name would make scanning dramatically easier; as I control our
own internal standards I'll make this a requirement, along with
configurations and components as well.
You might consider requiring that source files fall under a directory
with the same name as the library they're in. For example, if the
entity Foo was part of library work, and Bar was part of library play,
the directory structure look like so:
.../Project/sources/hdl/work/Foo.vhd
.../Project/sources/hdl/play/Bar.vhd
We don't do any Verilog development so I'm not sure how the concept of
a library is handled there.
Another issue we have is that a lot of our sub-components should be
accessible by some engineers, but not all engineers. By writing SCons
SConstruct and SConscript files and using BuildBot, the idea was that
an engineer could check in their sub-project and the server would
initialize a build over the whole project while keeping components
isolated to their respective developers. That is - our organizational
issue is as follows: each component should have two levels of access -
one public for declaration, one private for specification; if a team
was designing an Ethernet controller we'd want the entity, component,
configurations, behavioral simulations, and packages that define the
types needed to interface with it to be available to everyone, while
we'd want the implementation structure hidden. This would require a
public/private fork of the directory structure under mercurial to
accomplish, i.e.
.../Project/public/source/hdl/work/Foo.vhd
.../Project/private/source/hdl/work/Bar.vhd
Then there would be a mercurial repository at Project, and public and
private would be sub-repositories.
Further, since mercurial allows pre and post hooks for all commands,
the plan was to preempt any push to a stable repository on the server
with an initiation of Unit Tests across the entire project (sub and
sup modules...) that must be passed before it can successfully be
pushed. The issue is that some modules will be used in multiple
projects. We have yet to figure out the optimal method of doing this.
I.E.
Project1/submodules/Project3/...
Project2/submodules/Project3/...
Project3/...
Pushes to Project3 should automatically initiate unit testing for
Project1 and Project2. I have no clue how to do this effectively and
efficiently.
Overall though, I like the proposal. If I can make it fit my need for
public/private portions of submodules I'll definitely use it. Thanks.
~Jonathan Ross