tcdev
23rd September 2009, 12:45 AM
I'm attempting to "future-proof" the designs once again, and in the process every single project in the repository will have to be updated.
The problem I'm trying to solve is that several projects have "custom" i/o requirements which break the PACE architecture as inevitably they require access to pins (eg. GPIO) at the top level. And of course the use of these pins is project-specific and in some cases not compatible with other projects on the same target.
In the past this has required custom "target_top.vhd" modules and in some cases custom "pace.vhd" modules for each project. This has become a nightmare to maintain and also requires duplicated effort when the architecture does change. :eek:
So. I've added some signals that get passed up/down to/from target_top.vhd and platform.vhd. These signals are records that are defined in target_pkg.vhd, platform_pkg.vhd and project_pkg.vhd. Not sure if the former will ever be used, but it's there just in case.
In addition, each target_top.vhd (will) instantiate a custom_io.vhd module. This module connects all "non-standard" I/O pins on the target to the target, platform and project records. A good example is the DE1 platform whose custom_io module connects the GPIO header pins.
There is a "stub" custom_io.vhd module in each target directory. This needs to be included in every project that does not use any custom I/O.
For those projects that do use custom I/O, a project-specific version of the custom_io.vhd file would be included. This module would then hook up the I/O in a project-specific fashion, using the platform/project-specific record members of the custom I/O signals defined in the project.
NOTE: I'm currently in the process of implementing all this and have yet to fully implement some custom I/O using this mechanism, so there may well need to be some "tweaks" to the architecture along the way.
The upshot of all this is - there should rarely be a need for any custom target_top.vhd module. Any project with custom I/O requirements just includes its own custom_io.vhd module. Hopefully cleaner, easier to follow, and less work to maintain. :cool:
The problem I'm trying to solve is that several projects have "custom" i/o requirements which break the PACE architecture as inevitably they require access to pins (eg. GPIO) at the top level. And of course the use of these pins is project-specific and in some cases not compatible with other projects on the same target.
In the past this has required custom "target_top.vhd" modules and in some cases custom "pace.vhd" modules for each project. This has become a nightmare to maintain and also requires duplicated effort when the architecture does change. :eek:
So. I've added some signals that get passed up/down to/from target_top.vhd and platform.vhd. These signals are records that are defined in target_pkg.vhd, platform_pkg.vhd and project_pkg.vhd. Not sure if the former will ever be used, but it's there just in case.
In addition, each target_top.vhd (will) instantiate a custom_io.vhd module. This module connects all "non-standard" I/O pins on the target to the target, platform and project records. A good example is the DE1 platform whose custom_io module connects the GPIO header pins.
There is a "stub" custom_io.vhd module in each target directory. This needs to be included in every project that does not use any custom I/O.
For those projects that do use custom I/O, a project-specific version of the custom_io.vhd file would be included. This module would then hook up the I/O in a project-specific fashion, using the platform/project-specific record members of the custom I/O signals defined in the project.
NOTE: I'm currently in the process of implementing all this and have yet to fully implement some custom I/O using this mechanism, so there may well need to be some "tweaks" to the architecture along the way.
The upshot of all this is - there should rarely be a need for any custom target_top.vhd module. Any project with custom I/O requirements just includes its own custom_io.vhd module. Hopefully cleaner, easier to follow, and less work to maintain. :cool: