- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i don understand the coding as below:
signal bit : unsigned (3 downto 0); U_Bit_counter1: Bit_counter1 port map (inc=>inc_bit, clr=>clr_bit, count=>bit, reset=>reset, CLK=>CLK); Is that possible to use reserve word to declare the name of signal? Is there any problem to use it? If there is no problem, what is the function to use it? ThanksLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"bit" is a predefined type in the package standard. I'd be very surprised if that code compiled; if it does I would expect that you'd encounter weird problems down the road. Keywords are exactly that - if you start using them as signal / variable names then the compiler cannot understand what you're trying to tell it.
Even if that code does compile it's asking for trouble - I would advise that you change it. Besides, "bit" isn't very descriptive and doesn't help another programmer understand what your code is doing. Hope this helps.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your opinion

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page