Set defines of modules - Printable Version +- PULP Community (https://pulp-platform.org/community) +-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1) +--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2) +--- Thread: Set defines of modules (/showthread.php?tid=134) |
Set defines of modules - LPLA - 11-12-2019 Hello, throughout the code you can find things like: Code: `ifdef QUENTIN_SCM or Code: `ifndef PULP_FPGA_EMUL and there are two things about this that i just couldn't figure out. First: Where are those defines? Let's say i want to use Quentin, where would i put `define QUENTIN_SCM (assuming this is the correct syntax). Second: Assume i am having three different modules for multiplication mul1, mul2, mul3. Every module has additional inputs if you want to do floating point multiplication. This is handled by: Code: `ifdef FP_ENABLE I tested all three modules with Questasim using a testbench and created a .do file for them. Now inside my .do file i have the following command: Code: set ms [concat mul1 mul2 mul3] If i now try to use my modules somewhere in PULPissimo i get some errors from my makefile that tell me some ports of the module are missing. Basically the above command tells the modules mul1, mul2, mul3 that FP_ENABLE is defined and therefore the additional ports are instantiated. Unfortunately i don't know how to use the same idea when trying to instantiate a mul-module in PULPissimo. It is important to note that i don't want to change any line of code in the mul-modules! Does anyone know a way how to tell the modules its defines just like the above command does? Thank you. LPLA RE: Set defines of modules - pschiavo - 11-13-2019 Hello, We usually put our define in these files: https://github.com/pulp-platform/pulpissimo/tree/master/rtl/includes Please, note that we are updating PULPissimo and its IPs during these days and something may be currently not aligned. If you see any issues, please report them to the corresponding GitHub repository in the ISSUE tab. For what concerns the FP_ENABLE, which IP are you talking about? I do not understand which is the MUL module in PULPissimo. Can you help me? thanks Davide RE: Set defines of modules - LPLA - 11-14-2019 (11-13-2019, 08:51 AM)pschiavo Wrote: Hello, Thank you. I suspected that those are the correct files but i made a mistake somewhere else which messed up my includes. I usually don't update the IPs but you are right of course so thanks for reminding me. The only thing i changed was the HWPE event ID as mentioned here so i have to be careful when updating. (11-13-2019, 08:51 AM)pschiavo Wrote: For what concerns the FP_ENABLE, which IP are you talking about? I should have been clearer about what i mean, my mistake. The module i was talking about is not part of PULPissimo. I was talking about a new module, let's say a custom accelerator. If that module uses a line like: Code: `ifdef FP_ENABLE Your solution worked wonderfully. I had to set the defines in one of the files you mentioned. It didn't work before because i made a mistake somewhere else which kept my defines from reaching the module. Thanks again for the quick help. |