Lab1-Sup.pdf - Note for generating std_logic_vector VHDL example code from bits to array 1 library ieee 2 use ieee.std_logic_1164.all 3 entity circuit_2

Lab1-Sup.pdf - Note for generating std_logic_vector VHDL...

This preview shows page 1 out of 1 page.

Note for generating std_logic_vector VHDL example code from bits to array: 1 library ieee; 2 use ieee.std_logic_1164.all; 3 entity circuit_2 is 4 Port ( a_vec : in STD_LOGIC_VECTOR(0 to 2); 5 b_vec : in STD_LOGIC_VECTOR(0 to 2); 6 out_vec : out STD_LOGIC_VECTOR(0 to 2)); 7 end circuit_2; ----------------------------------------------------- 8 architecture Behavioral of circuit_2 is 9 begin 10 out_vec <= ( a_vec and b_vec ); 11 end Behavioral;
Image of page 1

Unformatted text preview: Use [ ] to index the bit from an array (or vector). For example, use out_vec[1] to represent bit 1 of out_vec array. Example code of the constraint file for associating sw and led using std_logic_vector: set_property PACKAGE_PIN T22 [get_ports {led [0] }] set_property IOSTANDARD LVCMOS33 [get_ports {led [0] }] set_property PACKAGE_PIN F22 [get_ports {sw [0] }] set_property IOSTANDARD LVCMOS33 [get_ports {sw [0] }]...
View Full Document

  • Spring '14

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes