Lecture-07 - EEE 333 VHDL L-07 VHDL Modeling Fall 2009 ASU...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
EEE 333: VHDL, L-07 Fall 2009, ASU David R. Allee, [email protected] , GWC 234 VHDL Modeling
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
EEE 333, ASU, D.Allee Lecture 07 - 2 - Highlight Data objects and types Signals, variables, and constants Scalar types Composite type Modeling of combinational logic Modeling architecture Behavioral descriptions Process statement Reading: Chapter 4, 5 in Ashenden’s book Assignment at myasu: HW 2
Image of page 2
EEE 333, ASU, D.Allee Lecture 07 - 3 - Highlight Data objects and types Signals, variables, and constants Scalar types Composite type Modeling of combinational logic Modeling architecture Behavioral descriptions Process statement Reading: Chapter 4, 5 in Ashenden’s book Assignment at myasu: HW 2
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
EEE 333, ASU, D.Allee Lecture 07 - 4 - Composite Types Scalar types consist of single, indivisible values Example: integer , physical, enumerated, std_logic , etc. Composite types consist of data elements in the form of an array or an record We can manipulate the entire object or each individual element Array: a collection of values that are the same type Each values position is indexed by a scalar value type word is array (0 to 31) of bit; type word is array (31 downto 0) of bit; The indexes don’t have to be numeric, they can be enumerated type controller_state is (initial, idle, active, error); type state_counts is array (idle to error) of natural; The index type has to be clear from the context Otherwise, it needs to be made clear explicitly type state_counts is array (controller state range idle to error) of natural;
Image of page 4
EEE 333, ASU, D.Allee Lecture 07 - 5 - Arrays You can first specify a subtype for the index subtype ram_address is integer range 63 downto 0; type ram_array is array (ram_address) of real; After defining the array type, you can define objects of that type variable buffer_register, data_register: word; variable counters: state_counts; variable coefficients: ram_array; The array is used as arrays in other programming languages coeff(0) := 0.0; counters(active) := counters(active) + 1; As a composite object, an array can be copied en-masse data_register := buffer_register;
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
EEE 333, ASU, D.Allee Lecture 07 - 6 - Example: RAM RAM is an array of memory cells begin for index in ram_address loop coeff(index) := 0.0; end loop; loop wait on rd, wr, addr, dataIn; if rd = ‘1’ then dataOut <= coeff(addr); end if ; if wr = ‘1’ then coeff(addr) := dataIn; end if ; end loop ;
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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