- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys..
Can anyone tell me how to read bits from a signal? Let's say I have 16 bits input signal and it's called signal A. How do I read the first 4 bits of the input signal and compare it with signal B which is also 4 bits? Is this possible? Thanks.Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can access any bits in A:
if A(3 downto 0) = B then --etc- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Tricky. It worked. =)
But how about if I want to read only 1 bit? Say, there's 01010101 and I want to read the 4th bit. Thanks.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
assuming A is declared something like:
A : in std_logic_vector(7 downto 0); op <= A(3);- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank Tricky! this helped so much. :)

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