7 Replies Latest reply on Sep 17, 2015 1:38 PM by jon.sharp

    API creation for custom verilog component


      Hi all.


      I managed to create my first PSoC custom component. It is written in verilog, and it contains a status and a control register, along with a datapath. Now, I'm trying to figure out how to write my API files so I can access these 2 registers from the CPU code. I know how to have the IDE create the files (that part is well-documented), but don't know what to put inside my .c and .h files to get to the underlying hardware.


      In my project's cyfitter.h file, I see a bunch of long and scary #define names for the registers that appear in my instatiated, custom, verilog component. I don't really know where to begin to wrap these in an API. Since I am using the standard status and control registers inside my verilog code, I was *hopeful* that APIs would be auto-generated for those, and then I would just need to manually create a wrapper API at my componet level to call the easy read/write API of the status and control register components. No such luck.


      Is there any help anyone can offer on how to make an API for a verilog custom coponent that needs to access its embedded status and control register components? This would seem like a pretty common use-case to me, but I'm VERY new to PSoC.