After the previous week has finished, this week we were back working on our first project. My task was to generate a UCF that will contain the wiring information. At the beginning of week, I had no idea what a UCF file is, nor how to generate it. Also, since the UCF will contain the wiring information, I had to modify my implementation of the schematic editor components, since they did not have ports, thus wires cannot be connected to them.

User Constraints File, or UCF, is an input file to Xilinx FPGA project, that specifies timing and placement constraints for the FPGA Design. There is a big number of constraints that can be specified in the UCF, however, for my purpose I only need to generate the LOC constraint. As stated in Xilinx Constraints Guide, LOC defines where a design element can be placed within an FPGA. It basically assigns the design elements to FPGA pins.

After that, I had to recreate the components in the schematic editor so that they can have ports, thus can be connected to other components. First, I searched how ports are implemented in JointJs. I used this tutorial as my starting point, and then explored the DEVS library (used to create ports) to understand how are they implemented. Then, I was able to use DEVS library to create different objects with port. The only problem I faced with DEVS library is that ports are generated automatically based on their number, and thus, doesn’t allow me to specify where exactly they are located and I cannot modify them for different objects. Hence I concluded that it was better to create my own library, and thus, I will be having a great flexibility in specifying how objects are implemented and the location of their ports. I used Logic Circuits LC library as a base, and modified it to suit my needs. Eventually, I had a working library that contains electronics components with ports.

Now, I had to make some changes to my Witty code, especially with regard to creating object and updating the schematic editor. Since I am redoing the algorithm, I decided to do it the “smart” way, by only sending a list of objects to be deleted and a list of object that are to be created instead of sanding the complete JSON file from the server. Once I done that, and these new objects are using the library I created I was ready to generate the UCF file. Since I already done most of the function of parsing the JSON file previously, it was fairly simple to modify it to extract the ports information and generate the UCF file.

My task next week will be trying to interface with Fritzing libraries and engines, thus, being able to use its power to handle some of our schematic editor functions.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.