![]() |
|
|
|
#1 |
|
Hi,
I just want to know if I missed something... If you have a toplevel entity with say a bus of single std_logic signals of inout mode and want to use this within a component, you can't really combine the signals to a std_logic_vector... right? That means you have to use the single inout signals on the component as well and use the toplevel entity signal names as actuals for the component instantiation. Two reasons: - if you use a signal assignment to map the signals into a vector, its only one direction... - u can't use array aggregates as actuals, beause they're not locally static, so a concatenation of type data => d4 & d3 & d2 & d1 would not work... Do you guys agree or did I miss a possibility? Cheers Andreas ajahn |
|
|
|
|
#2 |
|
Posts: n/a
|
what about this 'struct' solution: no in, no out, no hassle!
type data_t is record d1 : std_logic; d2 : std_logic; d3 : std_logic; d4 : std_logic; end record; entity MY_ENT is .... data: inout data_t; .... ajahn wrote: > Hi, > I just want to know if I missed something... > If you have a toplevel entity with say a bus of single std_logic > signals of inout mode and want to use this within a component, you > can't really combine the signals to a std_logic_vector... right? That > means you have to use the single inout signals on the component as well > and use the toplevel entity signal names as actuals for the component > instantiation. > Two reasons: > - if you use a signal assignment to map the signals into a vector, its > only one direction... > - u can't use array aggregates as actuals, beause they're not locally > static, so a concatenation of type data => d4 & d3 & d2 & d1 would > not work... no, but you workaround: signal data_in: std_logic_vector(3 downto 0); signal data_out: std_logic_vector(3 downto 0); begin .... data_out <= d4 & d3 & d2 & d1; din1 <= data_in(0); .... --instanciation: .... data_out=>data_out, data_in=>data_in, .... I prefer the 'record' solution, but some tools don't seem to ! > > Do you guys agree or did I miss a possibility? > Cheers > Andreas > Stephane |
|
|
|
#3 |
|
Posts: n/a
|
ajahn wrote:
> If you have a toplevel entity with say a bus of single std_logic > signals of inout mode and want to use this within a component, you > can't really combine the signals to a std_logic_vector... right? > - if you use a signal assignment to map the signals into a vector, its > only one direction... > - u can't use array aggregates as actuals, beause they're not locally > static, so a concatenation of type data => d4 & d3 & d2 & d1 would > not work... Using ports of type inout is often not a good way in deeper hierarchy of the design. Split every inout signals into one signal for input and one for output direction. Ralf Ralf Hildebrandt |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can not access console port of Cisco 7200 vxr | mansurbd | Hardware | 1 | 01-12-2009 06:53 PM |
| How to check current event and port status for Aliwei FXO gateway | Robin wang | Hardware | 0 | 04-11-2008 09:54 AM |
| Port 445: Effective/Safe Blocking | Samwise | General Help Related Topics | 0 | 01-06-2008 09:19 PM |
| Long, regarding a "lost" COM port | smackedass | A+ Certification | 4 | 02-05-2007 04:55 PM |
| Sony's BR Disc won't downrez to component | Goro | DVD Video | 7 | 03-16-2006 04:44 PM |