login(); } if (!empty($_GET['logout'])) { $auth_object->logout(); } // Next, we can check whether or not you're logged // in by checking the $auth->isLoggedIn() method if ($auth_object->isLoggedIn()) { // do stuff, you can check the ucinetid of // the person by looking at $auth->ucinetid if ($auth_object->allowedAccess($auth_object->EECS31L_ARRAY) or $auth_object->allowedAccess($auth_object->EECS31L_STUDENT_ARRAY)) { // don't need to do anything } else { // logged in, but not valid... // logged in but not valid... // don't need to do anything - allow access for all } } else { // you're not logged in, sorry... // try to log user in // logged in but not valid... // don't need to do anything - allow access for all } // Also, you can look at all the values within // the auth object by using the code: // print "
"; // print_r ($auth_object); // print ""; // As always, feel free to contact me with questions. // Eric Carter, ecarter@uci.edu ?>
In this assignment, you will design a small digital circuit, called DriveLock that locks the car driving (by setting an output w to 1) if either of the following conditions are met:
The purpose of this assignment is threefold:
This lab assignment requires you to translate a design specification in English language into a digital design consisting of gates from the given library. You are asked to develop a behavioral (functional) and structural (netlist) model and compare them with simulation (see Lab 1 videos for definition of behavioral and structural models).
Upload your VHDL file to drop box (EECS31/CSE31L>31Lab1>Assignment submission).
File names should be "lab1b_studentID.vhd", "lab1s_studentID.vhd", "lab1b_studentID_tb.vhd", and "lab1s_studentID_tb.vhd".
If your student ID is "12345678", then you should submit "Lab1b_12345678.vhd" for your behavioral model and "Lab1s_12345678.vhd" for your structural model.
Notes:
Template 1: lab0b_studentID.vhd
----------------------------------------------------------------------
-- EECS31L/CSE31L Assignment0
-- DriveLock Behavioral Model
----------------------------------------------------------------------
-- Student First Name : Your First Name
-- Student Last Name : Your Last Name
-- Student ID : Your Student ID
----------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY DriveLock_behav IS
PORT (k, p, s, d: IN std_logic;
w: OUT std_logic);
END DriveLock_behav;
ARCHITECTURE Behav OF DriveLock_behav IS
-- add your code here
END Behav;
Template 2: lab0s_studentID.vhd
----------------------------------------------------------------------
-- EECS31L/CSE31L Assignment0
-- DriveLock Structural Model
----------------------------------------------------------------------
-- Student First Name : Your First Name
-- Student Last Name : Your Last Name
-- Student ID : Your Student ID
----------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY NOR2 IS
PORT (x: IN std_logic;
y: IN std_logic;
F: OUT std_logic);
END NOR2;
ARCHITECTURE behav OF NOR2 IS
BEGIN
PROCESS(x, y)
BEGIN
F <= x NOR y AFTER 1.4 ns;
END PROCESS;
END behav;
----------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY DriveLock_struct IS
PORT (k, p, s, d: IN std_logic;
w: OUT std_logic);
END DriveLock_struct;
ARCHITECTURE Struct OF DriveLock_struct IS
-- add your code here
END Struct;