-
Notifications
You must be signed in to change notification settings - Fork 415
Unable to Describe Diagonal Wires with Current VPR architecture description #2043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The following gives some examples of how diagonal wires might be represented in the xml along with the pros and cons of each. Options are listed from most to least favorable. In all cases the examples given are of diagonal wires with vertical length 4 and horizontal length 2: Option 1: create a diagonal "wrapper" for two segment typesDescription: Diagonal wires could be represented by wrapping exactly 2 segments in a
Pros:
Cons:
Option 2: Create a diagonal interconnect inside of the custom switchblocklistDescription: Another option would be to specify a special type of switchblock within the switchblocklist for custom SB's. I think this route would be the simplest to implement in code and could potentially give the user the most amount of flexibility in how diagonal wires are defined. The following is just one possible implementation.
Pros:
Cons:
Option 3: create a new diagonal segment typeDescription: I believe this method would be the most difficult to implement in the code base. It would be similar to option 1 above in that it would exist in the segmentlist, however, an entirely new segment description would need to be created.
Pros:
Cons:
ConclusionI think Options 1 or 2 are the best choices for implementing diagonals in the xml. Option 1 is more intuitive in my opinion and has a good balance of user friendliness and flexibility. On the other hand Option 2 is likely much easier to implement and gives the user the maximum amount of flexibility. @jgoeders @vaughnbetz @ArashAhmadian I would love to get your feedback on these ideas. Which option is preferable and/or is there a better way to represent diagonal wires in the xml that you can see? |
I have found that a rough approximation of diagonal interconnect can be created using a very simple change to the architecture description and custom switch blocks. If a switch override tag is added to the
the wire_switch of the wire in the to set (
|
I tend to like the lower effort ones, so option 2 and the new option (which I think is close to option 2) seem worth trying, as they have the least code changes. Issue 0: (index 0 means both start and end of a wire): I suspect this isn't really a problem for unidirectional architectures (which are dominant) since we always connect to the start of the receiving wire, and I don't think we ever switch from the start of the sending wire. Hence (for example) a connection from horiz wire at index 0 -> vert wire at index 0 would (I think) always be an H->V diagonal connection, which is what we'd want. Issue 1 (redundancy): Specifying 8 segments is a bit of a pain if the architecture is symmetric. I think you're saying if we have four different types of diagonal wire (up->right, up->left, down->right, down->left) we'd need 8 segment types to specify the 4 types of diagonal connections. Option 3 gets rid of this redundancy by specifying the two pieces of the diagonal wire in one segment (shorter than 2 current segment descriptions, but longer than 1) and assuming symmetry in all four directions I think. I think the redundancy is an OK price to pay for the easier implementation and the more flexibility to specify some diagonals but not all. Issue 2 (edge effects): these are real, and it is OK to leave dangling wires there. Switch patterns get strange near the edges of FPGAs as wires get chopped off by the edge etc. |
Uh oh!
There was an error while loading. Please reload this page.
Current Behaviour
Several current FPGA's utilize diagonal routing in their architectures (specifically Xilinx parts). Currently, VPR has no way to implement this functionality. The proposal has been made that diagonal wires could be implemented by using a combination of shorted segments and custom switch blocks. However, there is a major issue with this:

The issue is that switchpoints in vtr are currently referenced as 0->1->2->...->0 (i.e. both ends have a 0 index). Custom SB allow for unique specification of interconnect for each switch-point, but because both ends are specified with a zero index there is no way to uniquely specify an interconnect for the two ends. To demonstrate why this is an issue, lets assume we want to create a diagonal wire that goes up/down 4 and over 2 (i.e. vertical length 4 wires and horizontal length 2 wires). The desired functionality would be to have each end of vertical L4 wires connect to each begining of horizontal L2 wires via a short and for the beginning of the L4 wire and the end of the L2 wire to have "normal" interconnect (i.e. able to connect to other wire types), as shown in the drawing bellow:
However, with the current iteration of VTR it is impossible to differentiate between the start and end of each wire segment in the architecture description since both the start and end are only accessible via their switch-points at the 0th index. The most you can do with the current architecture description is to short multiple diagonal segments together.
Possible Solution
This problem could be remedied by just changing how wire segments are represented (i.e. for a length y wire the start switchpoint has index 0 and the end switch point has index y), however, the assumption that both wire ends have index 0 is pretty deeply ingrained in the code used to build switch blocks and parse wire segments as well as in previously created architecture descriptions. The use case is also unique enough that I wonder if it would just be better to create a new diagonal segment type. I am currently going through the code base to determine the best way to implement diagonal wires and will post here once I have a better understanding of a good approach. The main purpose for this issue is to provide a place to discuss ideas for how diagonal wires should be implemented and how they should be represented in the xml if we go that route.
Update: after thinking about diagonal wires for a while and working through some proofs using set theory, it appears that there is actually a way to build a rough approximation for diagonal wires using only custom SBs and a very small change to the code base (I believe the issue stated above was an error on my part and also due to me trying to implement diagonal wires in a bi-directional architecture). In the case of unidirectional architectures at least, all that is needed is to specify that the wires being driven by the vertical component of a diagonal segment have a arch_wire_switch that is of type "short" (i.e. in a L4->L2 diagonal wire, the L2 wire wire switch is overridden to be a short). However, this technique for specifying a diagonal wire in all four Intercardinal directions (NE,NW,SE,SW) requires a high level of verbosity. At least eight segments are needed and four custom switch blocks to specify a single diagonal wire. Additionally, there are certain aspects of diagonal wires that make their routing and interconnection unique and difficult or impossible to describe in the current architecture description. In light of this, I still think it would be a good idea to create a special way to describe diagonal wires in the architecture.
The text was updated successfully, but these errors were encountered: