I’m have my Information Systems test today and I think that of all my exams, this is the one I’m looking forward to the least. Well, I was. It’s still going to be a tough test. But as it turns out, I actually have a wide margin on this exam.
To keep my current grade, I need to score between 35% and 85%. I gain a letter grade by score between 85% and 100%. If I don’t take the exam, I drop a letter grade.
Any how, the point is that I find it kind of depressing how large my window is to do nothing with my grade, yet at the same time it’s nice to know that I’ll be passing. 😕
I’m come down with a rather nasty cold (or something, crossing my fingers for cold though). It’s been really bad today and yesterday, so I’m hoping that I’m reaching the peak of this thing and will be back in full force for next week.
Next week also happens to be the last week of school before finals. Four days of school, Friday off, and then finals on Saturday, Monday and Wednesday.
I think the good news about finals is that two of my classes are going to be 100% take home finals (Digital Logic and Engineering Circuit Analysis). Advanced Engineering Math is also going to have a take home section.
To copy homework with no understanding of how to do it. Typically accomplished in the 10 minutes before said homework is due.
Originates from the Colorado School of Mines, where cold spiking is so revered that every year they award a prize for the best spiker.
Hey Jeremy! Let me cold spike your thermo or I’ll beat you bloody.
by Spjorkster Mar 10, 2005
A couple thoughts: I don’t know who “Spjorkster” is. I don’t cold spike; it’s stupid and I rather not turn in the homework. The term has been around since at least 2005, that’s amazing.
So now the project. The object reads:
The objective of this take-home project is to design and implement an electronic combination lock. The combination lock is to have a start-up combination code of 1-2-3-4 that MUST be changed immediately upon first-time activation. Furthermore, if the new combination code has three numbers all the same then an error message is to be sent and a different code has to be entered as the combination. Each number in the four-number combination code is to be an eight-bit vector.
The requirements are thus:
The combination lock design MUST be implemented as a state machine (using VHDL), with a minimum of three states: open, lock, set_combo. More that three states may be used (may or may not require greater than 3 states). The outputs should include a lock signal, indicating that the lock is currently locked, an open signal indicating that the lock is currently unlocked. The data inputs are to include the combination code (for when setting a new unlock code.) Additional there is to be a mechanism for resetting the entire circuit. Plus your design is to handle the succession of three wrong guesses at the combination by going into a security mode in which the initial code (1-2-3-4) followed by the entry of the correct code is required to unlock the lock. In your simulation waveforms, you MUST display the state variable (this will display the states traversed in setting, locking and unlocking the combination) along with the inputs and outputs.
There must also be at least four cases in which the combination is incorrect and at least three cases in which the combination is correct. And there is to be a string of three consecutive wrong attempts to unlock putting the circuit in the the security mode in which the initial code (1-2-3-4) immediately followed by the entry of the correct code is required to unlock the lock Remember to include in your report all schematics and/or VHDL code, simulation waveforms and state diagram/table.
Doing this all in VHDL isn’t as painful as I thought, but it was still very painful. I think the only thing I hated programing more so far was threaded tasks in Java. The idea of using states is somewhat similar, but not the same functionally.
Here’s the plan in a nutshell:
Yes, I did that state diagram. Isn’t it pretty?
Here’s the code:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE IEEE.STD_LOGIC_ARITH.all;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY combinationLock IS
PORT( Clock, Reset : IN STD_LOGIC; -- use positive logic for the reset
w : IN STD_LOGIC_VECTOR (1 DOWNTO 0); -- user action: 00 is no action; 01 is action; 11 is lock
a : IN STD_LOGIC_VECTOR (7 DOWNTO 0); -- digit a input
b : IN STD_LOGIC_VECTOR (7 DOWNTO 0); -- digit b input
c : IN STD_LOGIC_VECTOR (7 DOWNTO 0); -- digit c input
d : IN STD_LOGIC_VECTOR (7 DOWNTO 0); -- digit d input
aCode : BUFFER STD_LOGIC_VECTOR (7 DOWNTO 0); -- code of the first digit
bCode : BUFFER STD_LOGIC_VECTOR (7 DOWNTO 0); -- code of the second digit
cCode : BUFFER STD_LOGIC_VECTOR (7 DOWNTO 0); -- code of the third digit
dCode : BUFFER STD_LOGIC_VECTOR (7 DOWNTO 0); -- code of the fourth digit
unlockAttempt : BUFFER STD_LOGIC_VECTOR (1 DOWNTO 0); -- to keep track of how many attmpts have been made to unlock
isLock : OUT STD_LOGIC; -- is the safe locked
isError : OUT STD_LOGIC); -- is there error -- both lights on indicate in combo setting mode!
END combinationLock;
ARCHITECTURE Behavior OF combinationLock IS
TYPE State_type IS(SET_COMBO, LOCK_OPEN, LOCK_SECURE, SECURITY_MODE);
SIGNAL y : State_type;
BEGIN
PROCESS( Reset, Clock)
BEGIN
IF Reset = '1' THEN
aCode <= CONV_STD_LOGIC_VECTOR(1,8);
bCode <= CONV_STD_LOGIC_VECTOR(2,8);
cCode <= CONV_STD_LOGIC_VECTOR(3,8);
dCode <= CONV_STD_LOGIC_VECTOR(4,8);
y <= SET_COMBO;
ELSIF (Clock'EVENT AND Clock = '1') THEN
CASE y IS
WHEN SET_COMBO =>
IF (w(1) = '0' AND w(0) = '0') THEN
y <= SET_COMBO;
ELSIF (w(1) = '0' AND w(0) = '1') THEN
IF ( ( (a = b) AND (b = c) ) OR ( (a = c) AND (c = d) ) OR ( (a = b) AND (b = d) ) OR ( (b = c) AND (c = d) ) )THEN -- three numbers are repeated -- -----
isError <= '1';
y <= SET_COMBO;
ELSE -- program new code
aCode <= a;
bCode <= b;
cCode <= c;
dCode <= d;
isError <= '0';
y <= LOCK_OPEN;
END IF;
END IF;
WHEN LOCK_OPEN =>
isLock <= '0';
unlockAttempt <= CONV_STD_LOGIC_VECTOR(0,2); -- reset the security lockout
IF (w(1) = '0' AND w(0) = '0') THEN
y <= LOCK_OPEN;
ELSIF (w(1) = '0' AND w(0) = '1') THEN
y <= SET_COMBO;
ELSIF (w(1) = '1' AND w(0) = '1') THEN
y <= LOCK_SECURE;
END IF;
WHEN LOCK_SECURE =>
isLock <= '1'; -- set the lock indicator
isError <= '0'; -- clear all errors because it's locked now
IF (w(1) = '0' AND w(0) = '0') THEN
y <= LOCK_SECURE;
ELSIF ( w(1) = '0' AND w(0) = '1') THEN
IF (unlockAttempt = CONV_STD_LOGIC_VECTOR(0,2) ) THEN
IF (a = aCode AND b = bCode AND c = cCode AND d = dCode) THEN
y <= LOCK_OPEN;
ELSE
unlockAttempt <= CONV_STD_LOGIC_VECTOR(1,2);
y <= LOCK_SECURE;
END IF;
ELSIF (unlockAttempt = CONV_STD_LOGIC_VECTOR(1,2) ) THEN
IF (a = aCode AND b = bCode AND c = cCode AND d = dCode) THEN
y <= LOCK_OPEN;
ELSE
unlockAttempt <= CONV_STD_LOGIC_VECTOR(2,2);
y <= LOCK_SECURE;
END IF;
ELSIF (unlockAttempt = CONV_STD_LOGIC_VECTOR(2,2) ) THEN
IF (a = aCode AND b = bCode AND c = cCode AND d = dCode) THEN
y <= LOCK_OPEN;
ELSE
unlockAttempt <= CONV_STD_LOGIC_VECTOR(3,2);
y <= SECURITY_MODE;
END IF;
ELSIF (unlockAttempt = CONV_STD_LOGIC_VECTOR(3,2)) THEN
y <= SECURITY_MODE;
END IF;
END IF;
WHEN SECURITY_MODE =>
IF (w(1) = '0' AND w(0) = '0') THEN
y <= SECURITY_MODE;
ELSIF (w(1) = '0' AND w(0) = '1') THEN
IF(a = CONV_STD_LOGIC_VECTOR(1,8) AND b = CONV_STD_LOGIC_VECTOR(2,8) AND c = CONV_STD_LOGIC_VECTOR(3,8) AND d = CONV_STD_LOGIC_VECTOR(4,8)) THEN
unlockAttempt <= CONV_STD_LOGIC_VECTOR(2,2);
y <= LOCK_SECURE;
END IF;
END IF;
END CASE;
END IF;
END PROCESS;
END Behavior;
In all states (except Reset, which isn’t defined as typical state), ’00’ is used to stay within the state. ’01’ is used as an action key and ’11’ is used to lock the device (as noted with comments within the VHDL code). isError is ‘1’ when a user has entered a new invalid combination (any combination with where 3 digits are the same). Security Mode is entered when three unsuccessful attempts have been made to unlock the device. When this happens, the Security Mode-state is entered and the user must enter ‘1 2 3 4’. When this happens, the user is sent back to the Lock Secure-state and is granted one try before being kicked back to the Security Mode-state. However, if the attempt is correct, the user is sent to the Lock Open-state where they can change the combination or lock the device again.
Here’s the schematic:
…and the waveforms, which shows that it does indeed work:
Note: realACode, realBCode, realCCode, realDCode, realUnlock[1] and realUnlock[0] are debugging variables used to ensure that the device is working properly during testing. real*Code is used to display the stored combination code and realUnlock[*] is used to count how many attempts have been tried to unlock the device.
All in all, pretty cool. Minus the nine hours or so it took to do it.
Things have been busy around here of late. This next week will be even harder.
AEM Exam tomorrow, Digital Logic Exam on Friday, Information Systems Exam a week from tomorrow.
I also fly out a week from tomorrow.
Fluids Project due on Thursday. Digital Logic take portion of exam due on Friday.
Fluids homework due Wednesday, Friday, and following Monday. Information Systems homework due Monday and Wednesday. Engineering Circuit Analysis homework due tomorrow and a week from tomorrow.
Oh, and kids who sit in class on their laptop searching the internet. If you’re not going to pay attention, don’t go to class. There’s a little d-bag that sits in front of my during my Info. Systems class and does nothing but update his website, http://www.andrewferguson.net and never pays attention. Get the hell out of class.
You have to scroll down a little ways to get to the actual post.
I did a little bit of research to find out that my name caller is Hank Mowry. I have no idea who he is and I don’t think I’ve ever met him. All I really know is that he goes to Mines, is in my Info System class, and believes that I’m a douche bag (I’m pretty sure he didn’t mean dirt bag).
You’re right, I am on my computer. I’m sorry that I don’t pay enough attention to class for your needs. However, I pay enough attention for my needs and to do well in the class. I’m not sure why you believe I need to “Get the hell out of class”, seeing as I’m not disturbing you.
In any event, I really don’t care all that much. I’m mostly curious as to what you think I should do? I’m fine with dropping the issue (it’s dropped in my mind), but part of me wants to friend him or message him or poke him on Facebook: just to see what he’d do. Maybe he’ll even find this post!
Back in my high school days, I took a couple years of Spanish. One time in class, I read this hilarious comic.
Every once-in-a-while, I’ll remember the comic and think about finding it.
Well, about a month ago, I had another one of those hankerings and spent about a week looking on the Internet for it. I looked all over, but could not find it. So I emailed my Spanish teacher, Stephanie:
Stephanie,
I remember a comic that we read in your class (it might have been from one of the books) and I’m trying to find it. There’s a kid…
…[I described the story line here, but am redacting it to preserve the hilarity]…
I’ve searched for it high and low and can’t find it and was wondering if you a) know what the heck I’m talking about, and b) know where I might be able to find it?
-Andrew Ferguson
Stephanie was able to give me the lead I needed:
The comic strip you’re talking about is Argentinean and it’s called “Mafalda” I used to copy some strips onto the backs of tests.
Thus, the hunt began. I first did another check on the Internet to make sure that I still could not locate it with the additional information. While I found some Mafalda strips, I could not locate the one I was looking for.
So I turned to our library. Our school library is part of the Colorado Alliance of Research Libraries, a network of libraries throughout in Colorado and Wyoming. In short, I can jump on the Prospector search engine and search through everyones books and then have it sent to my library for free! It’s really quite spiffy.
After parsing (heh, “parsing” only a programmer would use that word) through those two books, I had not found my comic. So I hit up Prospector again. This time, I ordered “Mafalda 5“, and just to be on the safe side: “Toda Mafalda” (I like saying it in the movie announcers voice).
Well, needless to say, my search is over. There, lying at the top of page 61 in Toda Mafalda was what I have been searching for. It easily been four years, probably closer to five since I’ve seen this comic. And while I didn’t remember it word for word, I was pretty close. Enjoy one of my all time favorite comics:
Click to embiggen, side-scrollage might be needed if you use Internet Explorer.
Starting later today, I’ll be doing a series of articles on GottaBeMobile.com that deals with tablet issues from a student perspective. We’ll, at least from my perspective (if you know me, you know that I can bring a unique perspective to anything).
GottaBeMobile is the site for Tablet PC information, so it’s a pretty big honor to write for them.
I also need to take a moment to point out the incredible irony that finds me, an engineer, writing in a situation like this. One of the reasons I went to Mines was to get away from all the writing that high school and humanities classes had. Yet, I find my self blogging several times a week on my personal site and writing articles for two outside sites.
In any event, it’s going to be more of an article based series, rather than the short and informative posting I do like to do at StudentTabletPC.com. However, I think many will find them just as helpful.
I’ll post again when I put up the first article later today.
I’d also like to thank Rob for giving me (and STPC) a chance to expand my (our) audience and Tracy for letting me get away with it 😉 . Rob was also very helpful and kind in helping me make the decision to contribute to GBM, including helping me with a list of topics.
In my attempts to procrastinate homework, I decided to relive some childhood memories and install Window 3.11. I’d forgotten how much of a pain in the ass it was to install it.
First, you need a boot disk. This is actually pretty easy to get, just head over to BootDisk.com and pick the one you need. Then you need to fdisk and then format c:. These are the two critical steps that I always seem to forget, even Back in the Day™ when Windows 3.11 is what I actually used.
After that, it’s pretty easy. Pop in the MS-DOS disks and install that, then pop in Windows 3.11 disks and install that.
What amazes me is how fast it starts up. Including the BIOS, it takes 9.46 seconds to get into Windows. 9.46 seconds!!!
I’m going to try to get networking and Internet Explorer setup and installed…could be interesting.
For those who care, I’m doing this all in Virtual PC 2007.
After my birthday, I had a bit of a change in palette. I began enjoying beers and began to dislike mixed drinks. Over the summer, I discovered some amazing micro brews native to the Northwest (The Ram’s Buttface Amber Ale, Mac and Jack’s, Drop Top, and Alaskan Amber to name a few).
Unfortunately, I go to school in Coors Country and so I’m “stuck” with Blue Moon, Killians, and the wonderful selection from New Belgium Brewery (not a Coors product, but still native to Colorado).
However, the Great American Beer Festival is upon us here in Colorado and I will be joining my fellow twenty-one and over comrades in enjoying the fine brews of 1884 beers prepared by over 400 breweries from around the nation.
I’ll be going this Thursday (the 11th) with Mines (yes, our school sold tickets and is chartering a bus to the GABF). You’re welcome to join us if you’ll be in town, just give me a ring on the telly.
I hope to have a report on some great new beers when I return. Stay Tuned!
We are happy to inform you that your work has been accepted for the
Fall 2007 Art show! Due to the amount of entries, we were able to
accept no more than five works per artist.
We would like to show your pieces:
Bottom Side Pyramid Formation
Pyramid Formation Turn
United States Navy: 1 to 4
In case you’ve forgotten, here’s which ones they are:
Bottom Side Pyramid Formation
Pyramid Formation Turn
United States Navy: 1 to 4
The opening reception is scheduled for Thursday, October 11th from 4 pm to 6 pm, in the Boettcher Room of the Arthur Lakes Library.