element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Forum Connecting Verilog to Synthesis
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 12 replies
  • Answers 2 answers
  • Subscribers 546 subscribers
  • Views 2847 views
  • Users 0 members are here
Related

Connecting Verilog to Synthesis

mraureliusr
mraureliusr over 11 years ago

Hey everyone! Wish I had seen this group earlier.

 

I'm hoping there's a few here who are familiar with the Xilinx ISE. I'm finally making a concerted effort to learn Verilog and this time around I'm doing well. I'm grasping the language concepts well, and am enjoying the book I picked up from the local University library (public library is a bit short on HDL books!) called "Verilog for Digital Design" written by Frank Vahid and Roman Lysecky. Make sure to check for the 2002 edition, there are older versions as well. This book is the perfect blend of theory and practical code writing.

 

Anyway, I wanted to try implementing a simple design of my own, essentially recreating the functionality of four 74193 up/down binary counters. The inputs are four buttons, up, down, load and store. The load and store buttons control signals for a later stage of the design.

 

I wrote the counter module, then created a top level module and instantiated the     counter module. I simulated it with a simple test bench and it worked!! Amazing!

 

However, now I'm trying to implement it in my Spartan-3E FPGA and I'm having trouble figuring out the hierarchy of a typical design. Clearly the top level module interfaces with the actual pins, and then passes these states to the instantiated module. But how do I pick which pins connect to the top level module? I see that PlanAhead seems to implement this stage of the design but I'm confused on how to put it all together. I'm also having trouble connecting the counter module ports to the top level module. It keeps giving me errors for the output bus, saying something like it's not a proper lvalue? The counter module has the counter output declared as an output reg[15:0] ... is that incorrect? The top level module also has the actual output declared as an output reg, is it improper to commect these types together? I figured within the counter module that the output should be a reg ad not a wire, because it needs to hold its value. Plus the output needs to be manipulated directly and it seems a reg was the easiest way to do this


Perhaps these questions will be answered later in the book but the ISE/Xilinx specific problems won't be addressed as the author uses different software and never directly talks about specific brands. He does focus on both simulation and synthesis though, which is what I was looking for. Most books on Verilog place a heavy focus on simulation, and while I've discovered how useful simulation is, I have this Xilinx dev board that I want to play/learn with!


Thanks everyone for reading all that. image Will be happy to share more as I learn more. If it helps I can post my code here.

  • Sign in to reply
  • Cancel

Top Replies

  • johnbeetem
    johnbeetem over 11 years ago +1 suggested
    I've never used PlanAhead. I always use a User Constraint File (.ucf) to define the pinout. The easiest way is to start with a working .ucf as a template, and then modify it. For example, here is the UCF…
  • mraureliusr
    0 mraureliusr over 11 years ago in reply to johnbeetem

    Yeah, my dev board has a 50MHz clock, so it was just screaming along.

    I noticed in the 'Core Generator' they have simple building blocks, such as a binary counter of arbitrary width, however it generates gate-level code which I can't really decipher yet.

     

    It'd be awesome if it generated Verilog. Also, your suggestion of checking out the code templates has been really, really handy. I'm super excited to keep learning more, whichever is a good sign --mwhen I was; earning assembly, running into problems would just frustrate me and I'd get discouraged and stop working at it. However, (mostly because you've been around to point me in the right direction) I've been having a good time learning, which is super important for me.

     

    I've been thinking about doing a short video series on getting started with Xilinx ISE & Basic Verilog. There's a lot of good electronics resources on YouTube but almost nothing good on FPGAs.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • johnbeetem
    0 johnbeetem over 11 years ago in reply to mraureliusr

    Alexander Rowsell wrote:

     

    I've been thinking about doing a short video series on getting started with Xilinx ISE & Basic Verilog. There's a lot of good electronics resources on YouTube but almost nothing good on FPGAs.

    Gadget Factory has some FPGA tutorials: http://gadgetfactory.net/learn/

     

    I've never looked at them myself, but I've seen positive comments in the Gadget Factory forum.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube