shift-register

Attempting to use a Template instead of an Overloaded Function in Arduino: TYPE not declared in this Scope

走远了吗. 提交于 2019-12-14 01:22:53
问题 I'm trying to write a function that can Shift out data to 74HC595 shift registers which can shift out 8, 16, and 32 bit values. Using an overloaded function, I have this: /********************************************************************************** * Software SPI Pin Settings *********************************************************************************/ #define SPIPINPORT PORTB //The Port that the Pins are on. #define LatchPin 2 //_RCLK Shift register clock pin #define DataPin 3 /

Shift register for std_logic_vector in VHDL

走远了吗. 提交于 2019-12-13 04:35:37
问题 Can someone advise me, how to make shift register of 12 bit std_logic_vector items? 回答1: Take a look at the example below. VECTOR_WIDTH is the number of bits in each std_logic_vector (12, in your case). FIFO_DEPTH is the number of vectors you want in your shift register. library ieee; use ieee.std_logic_1164.all; entity vectors_fifo is generic ( VECTOR_WIDTH: natural := 12; FIFO_DEPTH: natural := 100 ); port ( clock: in std_logic; reset: in std_logic; input_vector: in std_logic_vector(VECTOR

Structural design of Shift Register in VHDL

别等时光非礼了梦想. 提交于 2019-12-12 05:13:30
问题 I've made a structural design of a shift register in vhdl . When WriteShift is 1 then I got shift and when it is 0 then shift register loads a price. Although load works perfectly when I set writeshift to 1 in testbench I get 00000 in simulation. My code is the following: entity ShiftRegis is Port ( Din : in STD_LOGIC_VECTOR (4 downto 0); WriteShift : in STD_LOGIC; Clock : in STD_LOGIC; reset : in STD_LOGIC; En : in STD_LOGIC; Q : out STD_LOGIC_VECTOR (4 downto 0)); end ShiftRegis;

Understanding two different ways of implementing CRC generation with LFSR

微笑、不失礼 提交于 2019-12-06 09:09:33
问题 There are two ways of implementing CRC generation with linear feedback shift registers (LFSR), as shown in this figure . The coefficients of generator polynomial in this picture are 100111, and the red "+" circles are exclusive-or operators. The initialization register values are 00000 for both. For example, if the input data bit stream is 10010011, both A and B will give CRC checksum of 1010. The difference is A finishes with 8 shifts, while B with 8+5=13 shifts because of the 5 zeros

Understanding two different ways of implementing CRC generation with LFSR

穿精又带淫゛_ 提交于 2019-12-04 17:12:20
There are two ways of implementing CRC generation with linear feedback shift registers (LFSR), as shown in this figure . The coefficients of generator polynomial in this picture are 100111, and the red "+" circles are exclusive-or operators. The initialization register values are 00000 for both. For example, if the input data bit stream is 10010011, both A and B will give CRC checksum of 1010. The difference is A finishes with 8 shifts, while B with 8+5=13 shifts because of the 5 zeros appended to the input data. I can understand B very easily since it closely mimics the modulo-2 division.