- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I use IP module, where data bus width is set to '1'. In VHDL code it is declared as type "std_logic_vector(0 downto 0)", but for compiler this is not the same as "std_logic", type of signal assigned to this bus. I changed manually in the component's source code type "std_logic_vector" to "std_logic", but then Model-Sim started to cry, that somewhere in its library in the component's entity is type "std_logic_vector". Does anyone have an idea, how to fix it? Maybe there is a compiler option to ignore it? greetingsLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No you need to change the signal type to std_logic everywhere. Maybe you forgot to do the change in one place?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can keep it as std_logic_vector and access your variable using parenthesis : data(0), no ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- You can keep it as std_logic_vector and access your variable using parenthesis : data(0), no ? --- Quote End --- It's working. I tried data(0 downto 0) and it failed, but data(0) is ok. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- It's working. I tried data(0 downto 0) and it failed, but data(0) is ok. Thanks! --- Quote End --- That is because data(0 downto 0) returns a std_logic_vector of length 1. data(0) returns a std_logic VHDL is strongly typed so it wont let you connect incorrect types without converting them properly.

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