9 Replies Latest reply on May 2, 2014 10:13 AM by JoMe_264151

    Component-to-pin mapping without schematic

      The way the component creator is setup, it implies that every component needs 1) A Symbol and 2) An implementation.  It seems as if there are three possible implementation methods for a Symbol (Verilog, Schematic, or Datapath).


      Is this accurate?


      If so, how do I make a component mappable to one of the output pins (as seen in the in the cydwr file)'


      without using a Schematic, but instead using Verilog.







        • 1. Re: Component-to-pin mapping without schematic

          Using DataPath for a self-written component needs verilog,too. When creating the symbol you need to specify the inputs and outputs according to the names in the verilog file. These pins will be routable when the component is instanciated on a .cysch.


          The process is described in the "Component Author Guide" in detail (which was installed in your Creator folder).





          • 2. Re: Component-to-pin mapping without schematic

             My question is really about how to use an output pin using only verilog, and not


            relying on a schematic.  Is that possible?

            • 3. Re: Component-to-pin mapping without schematic

              Never tried, don't know.





              • 4. Re: Component-to-pin mapping without schematic
                        First let's talk terminology. When you create a component you make logical connection points.v These points are known as terminals. Pins on the other hand, are physical connections on the chip. As it turns out there's also the component known as a pin (I know overloading the term) that you can place in your schematic.   
                That component (pin) has the Verilog primitives required for proper synthesis and routing. In general, you don't assign pins in the schematic, you assign them in the design wide resources.   
                Now the question I believe you're trying to ask, can I make a component that defines which physical pin to use in the design wide resources. The answer is no in general. There are a few corner cases where you might be able to specify to a particular pin (USB for example) as the only valid placement is that pin. This is done through attributes on the pin and asking for the same attribute.   
                If you were able to assign pins in the component, this would not be a good situation. First, it wouldn't allow you to re-target a smaller or different device. Fundamentally most components are chip agnostic, which is why the same design/component works on both 8051 and ARM. Furthermore, you would cause significant issues for people using your component. For example if I put down component foo, and it consumes P1[0] and then I put down component bar which also consumes P1[0] then I can't make my design. Furthermore, as a user I don't see any pins so I would be at a loss to explain why this was happening.   
                For this reason it is a bad idea in general to put a pin, or a clock in a component.   
                • 5. Re: Component-to-pin mapping without schematic

                  The concept of the "pin component" helps.  I understand that I can't directly map a pin component to an actual hardware pin without using the design resources file.  What I was looking for was the means to create the pin components (as abstractionsd) in verilog without making use of the visual designer.  It seems there is a library somewhere that I would have to use to access "pin components"...







                  • 6. Re: Component-to-pin mapping without schematic

                    There IS a requirement for a fixed assigninment Coponent <-> physical Pin :


                    When you create your own PCB it woul be VERY nice (cheap) to re-use that for the next project if possible. 


                    Assuming you created the Pioneer board it would be good if you have got a component that binds to the RGB-LED. When creating the next project you simply drop that component on your schematic and you can be darn sure that you did not mangle any pin onto a wrong place.


                    Dana was already asking for Kit layout templates that reflect the hardware wiring, but approaches like those discussed here could help as well.


                    So, as I understood, there seem to be properties of a pin that are requested for in a component. I think in PSoC4 the UART SCB is such an example, the component shows no IO-pins but they get routed to fhe correct locations.


                    Q: Can we (the user) assign new properties to a pin component or a descendant?


                    Q: If so, how can we write a component that requests a pin with that Property.





                    • 7. Re: Component-to-pin mapping without schematic
                      Here's the thing any of our components can be imported into your own library, including the pins component. Click on the components tab, right click on the project and select import.   
                      In custom.cs you'll see where C# code is writing the Verilog for the component. Meaning, you can do the same or a similar thing.   
                      There is a second way of doing this. Let's say you create a component foo and implement it in Verilog. You can then create component bar and implement it as a schematic. That schematic uses your component foo and a pin or multiple pins. That way when we have a new version of creator and change the pin component to fix a defect (or to extend capabilities to a new chip) all a user of component bar has to do is update their components and they get the new functionality for free.   
                      @Bob Marlowe   
                      There is a way to do that, but not in the Verilog. In concept a component is the same as a function in c. If your function contains assembly that relied on the stack point to be a particular value, it wouldn't be very useful. In the same way, components that force placement (other than the actual defined physical attributes of the chip) would make the component less valuable.   
                      Instead you can use placement directives to force the placement of pins. This is in the design wide resources and requires you to know the pin name. I believe in the community components there is an example of this by Chris Keeser.   
                      To answer your question specifically:   
                      No you cannot assign new properties. These properties are specific physical attributes of the particular pin. If we allowed editing, it would require you to update every chip in the catalog and would be limited to your machine. So if you send your project to John, he can't get the same results.   
                      Placement directives, being part of the design, are saved with the project.   
                      • 8. Re: Component-to-pin mapping without schematic

                        Thank you, Scott for your explanation. At least it makes things looking more clearly.





                        • 9. Re: Component-to-pin mapping without schematic
                                  @Bob Marlowe   
                          I'm glad that my ramblings made sense. I also understand exactly what you're trying to do. It is a problem we've wrestled with internally for a while, a user has a kit with a specific pin out, how do we help them use the correct pins for that kit? And how do we map that to other kits that support the same features?   
                          It is a problem we're actively trying to solve in a coherent and general way, and extending that support to user boards is definitely something I'll bring up in those discussions.