- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All the tutorials I can find have status and control registers as the go between for custom components.
Is it possible to write and read directly from/to a register in a verilog component? If so how?
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course you can write to verilog registers. The only problem is to get their names.Look into Component Author Guide chapter 6.2. Best practice is to rename the something cryptic names by #defining them in the component's .h file with better / shorter names.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your status register is named DAC856x_Manager_Done_Reg and from that you may read with DAC856x_Manager_Done_Reg_Read()
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler is giving me an error saying that function does not exist.
Build error: undefined reference to `DAC856x_Manager_Done_Reg_Read'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you look into the file DAC856x_Manager_Done_Reg.c you can see that the component was optimized-out. the reason would be that your verilog part for DONE_OUT signal allows for that. I admit that it is not easy to test verilog.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
in this case the FITTER is problematic. I have tested ...
a. published example as is .... without any digital logic between the Verilog output reg DONE_OUT and Status_Reg component => M0120 Build error - undefined reference to by FITTER elimated Status_Reg
b. published example with one digital NOT component inserted between DONE_OUT and Status_Reg. Compiler OK + Fitter OK => only the signal is inverted by the NOT.
c. published example with two digital NOTs components in series inserted between DONE_OUT and Status_Reg. => M0120 Build error - undefined reference to by FITTER elimated Status_Reg
Solution is here, change the schematics according to b. and change the signal evaluation - signal is inverted.
What remains .... HOW TO STOP unvanted FITTER OPTIMALIZATION. At least for study and testing purposed.
Regards,
Viktor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am afraid that your solution removes the symptom and not the cause.
The Component Author guide clearly states that the way of creating is at first checking the component itself in a testing environment before it is used. I would suggest you to test your verilog-core component with some control and status registers to get hands on the bug you made. As a matter of fact: the optimizing-out of a component is done only when the component is without any useand can be replaced by a simple logic level or when the component's outputs are not connected to any further logic. I never fiddled araound with the fitter, but I am quite sure that your DONE output is clamped to a single logical value.
Bob