-
Notifications
You must be signed in to change notification settings - Fork 1
Integrate lvds reader into existing lvds decoder #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Campbell-LVDS_reader
Are you sure you want to change the base?
Integrate lvds reader into existing lvds decoder #1
Conversation
| clock <= decoder_outclock; | ||
| clock <= clock_s; | ||
|
|
||
| -- ALTLVDS and the sensor use different bit orderings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the case? I've looked at my testbench code and the sample data appears to be shifted out LSB to MSB. In the simulation the parallel values were what I was expecting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the ALTLVDS documentation said it did MSB to LSB, but maybe I misread it. I was pretty tired when I wrote that part.
| to_fifo <= (others => '0'); | ||
| end if; | ||
| end if; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand this code simply instantiates lvds_reader_top and converts the output from an array into a 1D std_logic_vector as well as handling a little bit of alignment checking. Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. It flattens the output so it can easily be passed through a FIFO buffer. Not the best but it works
|
|
||
| -- Basically a constant to check that all pll_locked signals are HIGH because Quartus | ||
| -- can't handle unary AND operations :( | ||
| constant check_pll_locked : std_logic_vector (NUM_CHANNELS downto 0) := (others => '1'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After I changed the compiler to VHDL 2008 unary AND operations might actually work. I would need to test this though
| gen_lvds_ip : for i_gen in NUM_CHANNELS-1 downto 0 generate | ||
| inst_lvds_ip : lvds_reader_ip port map ( | ||
| pll_areset => lvds_pll_reset, | ||
| rx_channel_data_align(0) => lvds_bitslip(i_gen), | ||
| rx_in(0) => lvds_data_in(i_gen), | ||
| rx_inclock => lvds_clock_in, | ||
| rx_cda_max(0) => lvds_cda_max(i_gen), | ||
| rx_locked => pll_locked_extended(i_gen), | ||
| rx_out => lvds_data_array(i_gen), | ||
| rx_outclock => i_lvds_parallel_clock(i_gen) | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. This looks a lot cleaner now.
| channel_select <= 0; | ||
| alignment_word <= (others => '0'); | ||
| current_data <= (others => '0'); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the PLL reset signal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 263
No description provided.