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 MuseumAlarm. A museum has four rooms, each with a motion sensor (m0, m1, m2, and m3) that outputs 1 when motion in the room is detected. At night, the only person in the museum is one security guard who walks from room to room. Create a combinatorial circuit that sounds an alarm ( by setting an output A to 1) if motion is ever detected in more than one room at a time (i.e., in two or three rooms), meaning there must be one or more intruders in the museum.
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 name should be "Lab1b_studentID.vhd" and "Lab1s_studentID.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: Lab1b_studentID.vhd
----------------------------------------------------------------------
-- EECS31L/CSE31L Assignment1
-- MuseumAlarm 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 MuseumAlarm_behav IS
PORT (m0, m1, m2, m3: IN std_logic;
A: OUT std_logic);
END MuseumAlarm_behav;
ARCHITECTURE Behav OF MuseumAlarm_behav IS
-- add your code here
END Behav;
Template 2: Lab1s_studentID.vhd
----------------------------------------------------------------------
-- EECS31L/CSE31L Assignment1
-- MuseumAlarm 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 NAND3 IS
PORT (x: IN std_logic;
y: IN std_logic;
z: IN std_logic;
F: OUT std_logic);
END NAND3;
ARCHITECTURE behav OF NAND3 IS
BEGIN
PROCESS(x, y, z)
BEGIN
F <= NOT (x AND y AND z) AFTER 1.8 ns;
END PROCESS;
END behav;
----------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY MuseumAlarm_struct IS
PORT (m0, m1, m2, m3: IN std_logic;
A: OUT std_logic);
END MuseumAlarm_struct;
ARCHITECTURE Struct OF MuseumAlarm_struct IS
-- add your code here
END Struct;
Lab1B (Lab1S) due by 12:00 PM on:
January 20 (27), 2012
1 extra point for Lab1B, 1 extra point for Lab1S
Lab1B (Lab1S) due by 12:00 PM on:
January 13 (20), 2012