Welcome Guest ( Log In | Register )

6 Pages < 1 2 3 4 5 > » Bottom

Outline · [ Standard ] · Linear+

 Computer Engineering Thread, # 67 members already :D #

views
     
TScharge-n-go
post Nov 16 2005, 09:26 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

how about 16-bit Array multiplier? hahaha.
TScharge-n-go
post Nov 29 2005, 12:18 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

CODE
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;


ENTITY CLA_3bit IS

PORT (
   a2, a1, a0 : IN BIT;
   b2, b1, b0 : IN BIT;
   c0  : IN BIT;
   c3  : OUT BIT;
   s2, s1, s0 : OUT BIT
  );
END ENTITY;


ARCHITECTURE cla of CLA_3bit IS

--signals declaration
SIGNAL bx2, bx1, bx0 : BIT;
SIGNAL p2,  p1,  p0 : BIT;
SIGNAL g2,  g1,  g0 : BIT;
SIGNAL c2,  c1  : BIT;


BEGIN
--B input XOR-ed (for subtract)
bx0 <= b0 XOR c0;
bx1 <= b1 XOR c0;
bx2 <= b2 XOR c0;

--Carry Lookahead (P & G generation)
g0 <= a0 AND bx0;
g1 <= a1 AND bx1;
g2 <= a2 AND bx2;
p0 <= a0 OR bx0;
p1 <= a1 OR bx1;
p2 <= a2 OR bx2;

--Carry Generation
c1 <= g0 OR (p0 AND c0);
c2 <= g1 OR (p1 AND g0) OR (p1 AND p0 AND c0);
c3 <= g2 OR (p2 AND g1) OR (p2 AND p1 AND g0) OR (p2 AND p1 AND p0 AND c0);


--Sum Output
s0 <= a0 XOR bx0 XOR c0;
s1 <= a1 XOR bx1 XOR c1;
s2 <= a2 XOR bx2 XOR c2;

END cla;



results:

user posted image

wondering why i get so many 'spikes'.. anybody can help me? thanx wink.gif
TScharge-n-go
post Dec 3 2005, 12:40 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

martianunlimited,ikanayam, Thanx 4 the help smile.gif

//ikanayam, all the best to u.



I'm not sure why the result is like that. Sigh.....
Just trying to do like:
(A.B.L3 + A.B'.L2 + A.B'.L2 + A'B'.L0)' '
= ( (A.B.L3)' . (A.B'.L2)' . (A.B'.L2)' . (A'B'.L0)' )'

but kenot work sad.gif

CODE
LIBRARY ieee;
USE ieee.std_logic_1164.all;

ENTITY lu_1bit IS
PORT (
   a : in std_logic;
   b : in std_logic;
   l3 : in std_logic;
   l2 : in std_logic;
   l1 : in std_logic;
   l0 : in std_logic;
   o : out std_logic
  );
END ENTITY;


ARCHITECTURE lu OF lu_1bit IS

SIGNAL a_not, b_not: std_logic;
SIGNAL s1,s2,s3,s4 : std_logic;

BEGIN
a_not <= NOT a;
b_not <= NOT b;
s1  <= (a NAND b) NAND l3;
s2  <= (a NAND b_not) NAND l2;
s3  <= (a_not NAND b) NAND l1;
s4  <= (a_not NAND b_not) NAND l0;
o  <= ((s1 NAND s2) NAND s3) NAND s4;

END lu;




Attached thumbnail(s)
Attached Image
TScharge-n-go
post Dec 3 2005, 12:43 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

This is the original one (without converting to NAND) and its results:

CODE

a_not <= NOT a;
b_not <= NOT b;
s1  <= a AND b AND l3;
s2  <= a AND b_not AND l2;
s3  <= a_not AND b AND l1;
s4  <= a_not AND b_not AND l0;
o  <= s1 OR s2 OR s3 OR s4;





Attached thumbnail(s)
Attached Image
TScharge-n-go
post Dec 3 2005, 09:59 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(ikanayam @ Dec 3 2005, 01:05 AM)
(a NAND cool.gif NAND l3 = ((A.cool.gif'.L3)'
which is not the same as
a NAND b NAND l3 = (A.B.L3)'
lol, i was so blur to notice last nite tongue.gif
btw, i'm using a NAND b NAND l3 at 1st, but the NAND syntax doesnt allow me to do so, and the compiler asked me to put into bracket form.


QUOTE(martianunlimited @ Dec 3 2005, 08:39 AM)
your de'morgans feels wrong though, you should have a NOR somewhere in your translation

O = ( S1 nor S2 ) NAND (s3 nor S4)
or rather net1 = S1 NOR S2;
net2 = S3 NOR S4;
O = net1 NAND net2;

P/S Ikan, keep up updated ya. We will have a celebration on this thread if you win (if you don't then we will drown our sorrow with virtual booze)
*
thanx for your long feedback biggrin.gif
anyway, i think my de morgan should be ok (pls refer to the diagram attached). I've tested with a set of input and it is identical to the original AND-OR. Maybe i should try your method as quoted above wink.gif
Hmm... how about building custom gate with vhdl tongue.gif
maybe i'll js define NAND3 component with this function:
output <= NOT (x AND y AND z);

well, fishy, we not only celebrate here if u win, but oso in the pizza thumbup.gif


Attached thumbnail(s)
Attached Image
TScharge-n-go
post Dec 3 2005, 10:51 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(martianunlimited @ Dec 3 2005, 10:28 AM)
Err I am confused... according to your diagram S0-S3 is an input not the output of the AND3, anyway, from the circuit diagram i can see some possible optimization opportunity using Quin-McClusky.
Without using the 3-fanin logics, i believe that the equations i gave one of the most simplified. (of course O = NAND(NAND(A,B,S3),NAND(A,B',S2),NAND(A',B,S1),NAND(A',B',S0)) is even better than what anybody else here can give
 
I agree, a NAND3 macro will make your life a lot easier; (build the NAND4 and NOR3 and NOR4 while you are at it)

Btw, this is a mux right? why don't you use the case statement instead?
(have to look it up.. but it looks something like)

select := A & B; (concatenate the 2 bits)

CASE select IS
   WHEN "00" => O <= S0;
   WHEN "01" => O <= S1;
   WHEN "10" => O <= S2;
   WHEN "11" => O <= S3;
END CASE;

(Or are you trying to synthesize the codes?)
haha, sorry. actually the diagram is drawn long ago (during my 1st sem). The naming is not updated yet. the S3 -> S0 in diagram is actually the L3 -> L0 in the code tongue.gif

Well, this is not a MUX actually, more like a 4-bit selector. MUX implementation will take 2x more transistors and delays. This design has 16 functions actually, but i only choose 4 of them due to the limitation of 20 instructions only for my FYP.

btw, wat is "Quin-McClusky", hahaha.

Here is the comparison of this design and the mux approach.

This post has been edited by charge-n-go: Dec 3 2005, 10:55 AM
TScharge-n-go
post Dec 4 2005, 09:46 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(X10A Freedom @ Dec 3 2005, 10:45 PM)
from the bold sentence, this is due to the fact maxplus 2 doesn't have NAND3
it only has NAND2
theoratically(based on the actual standard), it should be supported......but u know, they done this to suite their hardware requirement, that's why sometimes people prefer to use hdl designer and modelsim to do their simulation because these tools are created to support the standard(and not like Altera etc which build the software to support their hardware)
building custom gates? i don't think it's possible with vhdl........unless they allow you to do UDP(User Defined Primitives) which so far MaxPlus2 isn't supported(and i think vhdl doesn't have these, only Verilog as far as i know)
I've successfully 'built' NAND_3 and NAND_4. It's quite easy actually, hahah. (it's better to say 'described' a new gate) tongue.gif

CODE
LIBRARY ieee;
USE ieee.std_logic_1164.all;

ENTITY nand_3 IS
PORT(
  x, y, z : IN STD_LOGIC;
  output  : OUT STD_LOGIC
 );
END ENTITY;


ARCHITECTURE n3 OF nand_3 IS

BEGIN
output <= NOT(x AND y AND z);

END n3;

TScharge-n-go
post Dec 4 2005, 08:02 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE
haha, that's not really creating a UDP(User Defined Primitive) coz the transistor count is different tongue.gif (3 input NAND has 6 transistor while 3 input AND with NOT will have 8)
maybe u should at least try Quartus 2 or HDL designer & Modelsim, it's better than Maxplus2 tongue.gif
lol, u r right. but my project requirement is Max Plus 2 as the main simulation tool. I js wanna prove that AND-OR combination can be reduced to NAND.
TScharge-n-go
post Dec 30 2005, 07:51 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(fridaynite @ Dec 19 2005, 01:49 AM)
Wow.. a computer engineering thread. cool..
hello bros! me UTM grad Comp. Eng. 3 yrs ago
pspice and matlab also 'rusty' already.. tongue.gif
*
QUOTE(boxsystem @ Dec 19 2005, 02:58 AM)
A final year student here. Will be graduating soon enough(hopefully). Anyway, any of u guys have any links to Image processing C++ source codes and information. Stucked with my FYP(final year project). hehe.
*
QUOTE(stanum @ Dec 29 2005, 07:04 PM)
opps... software engineering student here.. a bit late to register here as computer engineering member heh?
*
Welcome to the group.

Boxsystem, maybe u can share the knowledge about image processing here biggrin.gif
TScharge-n-go
post Jan 13 2006, 11:35 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(hao @ Jan 10 2006, 10:56 PM)
Actually MMU's fee is cheap among other private universities.

Btw, Bachelor(HONS) Electronics Gamma Year here. Going to sit for Physical Electonics exam this thursday and this subject is one of the pain in the ars subject to me  sweat.gif
*
QUOTE(Mr_47 @ Jan 11 2006, 01:07 AM)
list down other hard core subject pls,,,,,,,,,,,,,,,,,,,,,,,,,! unsure.gif
*
QUOTE(Survivor @ Jan 11 2006, 08:29 AM)
Physical Electronics...i've been through that bro...hehehe...mind u it is not the toughest...wait till u take on Digital Signal Processing on ur Epsilon year...hope you wont cry...hahaha tongue.gif
*
QUOTE(hao @ Jan 11 2006, 12:28 PM)
Arrr... nooooo.... my eyes!! MY EYES!!!! argghhh....
laugh.gif
*
QUOTE(LJS @ Jan 12 2006, 11:53 AM)
EE here,now still studying

i'm noob about computer engineering

join to gain knowledge

haha,mmu ppl at here
just after finish physical electronics,not easy ler

the most easy is LCD part,just hamtam wat u had study
*
QUOTE(Survivor @ Jan 12 2006, 12:09 PM)
Ahhhh....those were the days...which i wont miss even one bit...hahaha...life in MMU has gone! passed! life with mid-term and final has passed! over!  biggrin.gif it is not easy...but i think all of you who were still studying will make it, no doubt! smile.gif
Ever think about your Final Year Project yet? Jonas is a good supervisor to choose if you were in Mlk campus.
*
QUOTE(LJS @ Jan 12 2006, 12:26 PM)
now i just gamma year,saturday got ECP COA final test then holiday liao
*
QUOTE(Enforcer^Shizophremia!! @ Jan 13 2006, 02:26 AM)
sorry guys.18 yars old noob here.wanna ask computer eng n electrical eng is same course ke? also kat mmu ada compu eng ke? as far as i know only JMTI got computer engineering.
*
Thanx for your participation. However, this thread is aimed to do technical discussion rather than chit chatting or ask about education stuff. You have Kopitiam section and Education Essential threads for these.

Anyway, welcome to the technical discussion, hope you can contribute some knowledge to enlighten us in the future wink.gif
TScharge-n-go
post Jan 19 2006, 10:51 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(cafuheva @ Jan 18 2006, 10:15 PM)
Circuit Theory is dam hard subject in EE. Most of students fail to score each sem because of this subject. And some of them drop out and lucky person just got cukup makan and others repeat for this subject minimum 2 times. Horror sweat.gif
*
Circuit theory isnt hard actually, but circuit signal is much tougher, esp the analog part. IMHO, Field theory and electromagnetic is the most troublesome one tongue.gif


QUOTE(ikanayam @ Jan 19 2006, 10:30 PM)
zomg i think i will have to reduce it to 16 bits... they are limiting the pins to 100 pins so a 32 bit design would be a bit too big... >128pins...

Either that or i can cheat and do a 32bit multiplier only... easy to design, layout and pipeline... but then that is so uncool functionality wise.... sigh... decisions decisions....
*
haha, 16-bit with 32-bit multiplier seems ok mah. how about 32-bit input, 16-bit output? During the output u can pipeline it, make it 2 clocks wink.gif
TScharge-n-go
post Jan 28 2006, 07:55 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

What technique are u going to use for adder?
Will it be a balance of speed and size, or should be as small as possible?

With your current gate library, don't think can have more than CLA2 tongue.gif
TScharge-n-go
post Jan 28 2006, 11:16 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(ikanayam @ Jan 28 2006, 09:33 AM)
I'm using a variable length carry select adder, hand tuned specially for my purpose. The objective is be speed. I am still experimenting with some other hybrid adders, so this can still change.

Btw i'm adding a register array to enable thread switching to avoid pipeline stalls. Something like what the R5xx does. But very basic.
*
I have some hybrid adders built from yr standard gates tongue.gif
If you want I can send u the config and the propagation delay biggrin.gif

However, i only has 1 carry select implementation for the speediest adder wink.gif
TScharge-n-go
post Feb 25 2006, 04:20 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

I've been working on a register design in multiplier more than 2 days, problem still unsolved sad.gif


M0 (from bit 0 to 6)

Either INIT, MUL0 or MUL1 signal can enable the register.

During INIT state, the register is reset to '0'.

During MUL0 or MUL1 state,
it shifts right by 1-bit when M20 = 0.
it accepts AO input when M20 = 1.


Anyone knows the problem? Thanx !

VHDL Code:
» Click to show Spoiler - click again to hide... «


This post has been edited by charge-n-go: Feb 25 2006, 04:21 PM


Attached thumbnail(s)
Attached Image Attached Image
TScharge-n-go
post Feb 28 2006, 09:50 AM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(harrychoo @ Feb 26 2006, 11:55 AM)
hi there. i'm new here. degree for electronics. now working but my project now mostly in power electronics  sweat.gif

i have been reading ur code and the schematic.

can u explain more details what u want to achieve and what problem u encountered? seems like from the code and schematic is nth wrong in ur explanation above.
*
The register should b able to take in the output from adder when M20 = '1'. It will shift right when M20 = '0'. However, my simulation shows some 'glitches' which affects the output during the clock edge.

Well, i think I've somehow solve the problem by using behavioral statement with some IF and ELSE statements. It only takes 2.4ns instead of 17.5ns. This MaxPlus2 really weird, it doesnt like structural coding for sequential circuits tongue.gif

Thanx for the help and welcome to this thread biggrin.gif

This post has been edited by charge-n-go: Feb 28 2006, 09:51 AM
TScharge-n-go
post Mar 1 2006, 02:51 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

But the device is a Max7000B CPLD, i thought PLD should have standard logic cells? weird eh tongue.gif
TScharge-n-go
post Mar 5 2006, 06:43 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

heh, that's cool, will msg u about it later biggrin.gif biggrin.gif

Well, i got an 8-bit Adder/Subtractor which theoretically can work at 3.5GHz, using CSA, CLA and RCA combination. However, it is quite large la, around 500+ transistors.


QUOTE
it still utilizes lut's and muxes to do the work
muxes are good stuffs in terms of implementing arithmetic and sequential devices

icic. I thought FPGA is the only one using LUT. tongue.gif

This post has been edited by charge-n-go: Mar 5 2006, 06:43 PM
TScharge-n-go
post Mar 16 2006, 07:03 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(Annie @ Mar 14 2006, 08:51 AM)
what is lambda? forget d...but i remember studied before in university. But in real ic layout design, ppl tend to use micron compare to lambda.
*
i think lambda should be the wavelength of the UV light.
TScharge-n-go
post Mar 26 2006, 01:39 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

Mine is worse, only got this kinda diagram tongue.gif


Attached thumbnail(s)
Attached Image
TScharge-n-go
post Mar 27 2006, 09:17 PM

Look at all my stars!!
*******
Senior Member
4,060 posts

Joined: Jan 2003
From: Penang / PJ

QUOTE(knight @ Mar 26 2006, 05:57 PM)
Hi, i consider computer engineering course from TARC...currently mess up v the design tools...like truth table , state machine, K-map, transition map...other 4got dy...what else har??
*
hi, welcome.

QUOTE(ikanayam @ Mar 27 2006, 01:44 PM)
what program did you use to draw that stuff btw? need to draw a microprocessor datapath.... argh.
*
CorelDraw lanun edition, hahaha.
U can try adobe illustrator oso biggrin.gif

6 Pages < 1 2 3 4 5 > » Top
 

Change to:
| Lo-Fi Version
0.0385sec    0.52    7 queries    GZIP Disabled
Time is now: 21st December 2025 - 11:06 PM