Discussion about splitting the tsfpga project
There are plans to split the tsfpga project. I am currently looking for feedback. Please feel free to comment if you have any suggestions whatsoever, all feedback is welcome.
The tsfpga project is currently at ~37000 lines of code (wc -l `git ls-files`), and has three distinct parts:
- Core tsfpga (the
- Classes for representing modules, source files, IP cores, build hooks, constraints, build projects, netlist build projects...
- Parser for creating the above mentioned class objects, based on directory structure
- Vivado TCL code generator for project creation and build
- Parallel build runner for Vivado projects
- Register generator (the
- Classes for representing register lists, registers, register arrays, register fields, ...
- Parser for creating the above mentioned class objects, based on TOML file
- Code generator for VHDL, C, C++, HTML
- VHDL modules (everything in the
These three are quite independent of each other, and are each large/significant enough to warrant their own separate project. The three parts can be used separately (and are today, by some users).
Arguments for a split
- Splitting would make the projects more focused, and it would be more clear what each project does.
- It would be easier for users to use only the project that they are interested in.
- Also more clear that this is indeed possible. You do not have to use tsfpga project management in order to use the register generator.
- Avoid scope creep where the tsfpga repo grows more and more huge.
Arguments against a split
- Projects with inter-dependencies can result in a configuration management issue where only some versions of project A are compatible with some versions of project B.
The three are almost completely independent, but there are a few dependencies that I can think of:
- The register VHDL code generator (
tsfpga.register.register_vhdl_generator) must generate a format the the general AXI-Lite register file (
modules/reg_file/src/axi_lite_reg_file.vhd) can understand.
- Most modules have a
module_*.pyfile (for setting up VUnit test cases, defining netlist build projects and setting up formal tests). This file must follow the format that tsfpga expects.
I do not think that either of these is a problem. The interfaces are quite stable, and I have no current plans to change anything.
My current plan is to split the three into three separate projects:
tsfpga would still be distributed on PyPI under the same name.
hdl_registers would be distributed on PyPI under that exact name.
hdl_modules would be a simple source code repository, where stable releases would be tagged once in a while.
tsfpgarelease on PyPI would have a dependency on
hdl_registers, and would include the latest release tag of
hdl_modulesin its distribution. This means that for current users that install
tsfpgavia pip, there would be no changes.
- Users of only the current
tsfpga.regspackage would instead start using the
- Users of only the current
tsfpga/moduleswould instead check out the new
hdl_modules are currently a proposal only. They could be changed if anyone has a suggestion?
Current plan is to run projects on gitlab under
i.e. in the
Does this make sense, or should it be changed to e.g.
I personally think it makes sense to keep them in the same namespace. They are sister projects, who do share a little bit of dependency between each other, and tsfpga is the umbrella that integrates all three of them.