- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm writing a component using another component and was wondering what is the syntax to do that? I think I've read somewhere this is possible but I'm not entirely sure.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you defining your new component as schematic? Then you should be able to just add the existing component to it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, the new component is in verilog, as stated above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Silly me, stopped reading the subject too early 😞
AFAIK you can only instantiate components that are itself defined in verilog. So look whether the one you need is (there must be a meaningful .v file).
You need to include this .v file into yours (or cypress.v if its a PSoC building block such as clocks or control regs) and then just instantiate the component. I did a quick search in the existing components, and many of them instatiate registers and clock blocks - but I did not find one the re-uses another component. But looking at them should show how its done.