Welcome Guest ( Log In | Register )

33 Pages « < 18 19 20 21 22 > » Bottom

Outline · [ Standard ] · Linear+

 Computer Engineering Thread, # 67 members already :D #

views
     
harrychoo
post Apr 4 2006, 07:02 PM

Look at all my stars!!
*******
Senior Member
3,589 posts

Joined: Mar 2005
From: Bolehland


QUOTE(charge-n-go @ Apr 4 2006, 04:57 PM)
welcome [ r u g a ]. biggrin.gif
ERmm.. anyone knows how to extract certain bit from 'add' function?

Let's say,

SIGNAL a,b : STD_LOGIC_VECTOR (15 DOWNTO 0);
SIGNAL reg : STD_LOGIC_VECTOR (7 DOWNTO 0);

reg <= (a + b) from 15 downto 8.

What i mean is i need info from the added result A+B (bit 8 to bit 15) into reg. How can I actually do it in 1 clock only?

Thanx
*
reg must in 8 bit by definition? highlighted is not the actual syntax right? no "from 15 downto 8" right?

can i know in 1 clock means that must in 1 instruction line only?

sorry, too long din do vhdl oledi..

is it possible to shift a and b bits 1st before adding? sweat.gif
X10A Freedom
post Apr 4 2006, 07:49 PM

ZGMF-X20A Strike Freedom Gundam
*******
Senior Member
3,875 posts

Joined: Jan 2003
From: SJ


QUOTE(harrychoo @ Apr 4 2006, 07:02 PM)
reg must in 8 bit by definition? highlighted is not the actual syntax right? no "from 15 downto 8" right?

can i know in 1 clock means that must in 1 instruction line only?

sorry, too long din do vhdl oledi..

is it possible to shift a and b bits 1st before adding? sweat.gif
*
by shifting it, u won't get the data that u want as the addition will not be the same anymore
1 clk cycle means the cycle in relative to the clk, it's not instruction dependant, unlike microcontrollers which uses 1 clk for each instructions
TScharge-n-go
post Apr 4 2006, 08:03 PM

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

Joined: Jan 2003
From: Penang / PJ

QUOTE(X10A Freedom @ Apr 4 2006, 06:56 PM)
add another signal
RESULT : STD_LOGIC_VECTOR (15 DOWNTO 0);

reg <= result[15..8];
i think should be written this way
or else it will be
reg <= result[15 downto 8];
*
I've tried this actually:

add_result <= A+B;
reg <= add_result( 15 downto 8);

But using this method, A+B will be stored in add_result upon clock, and the previous clock add_result will be input into reg.

Actually i need the result immediately during current clock, tat's wat i meant by 1 cycle tongue.gif


QUOTE(harrychoo @ Apr 4 2006, 07:02 PM)
reg must in 8 bit by definition? highlighted is not the actual syntax right? no "from 15 downto 8" right?
can i know in 1 clock means that must in 1 instruction line only?
sorry, too long din do vhdl oledi..
is it possible to shift a and b bits 1st before adding? sweat.gif
*
Ya, there's no such thing as from 15 downto 8, js my description tongue.gif

If u wanna shift b4 add, can make it this way:
reg <= ('0' & a(7 downto 1)) + ('0' & b(7 downto 1))

Well, imho, sometimes 1 clock means that must be in 1 instruction line, and sometime it is not necessary.

Let's say :
IF (clk'EVENT AND clk='1')
a<=b;
c<=d;

^ this one can finish in 1 clock.

however,
IF (clk'EVENT AND clk='1')
a<=b;
c<=a;

^ this one will finish in 1 clock too, but c<=a is taking the A value on previous clock instead of value from latest B value.
X10A Freedom
post Apr 4 2006, 08:09 PM

ZGMF-X20A Strike Freedom Gundam
*******
Senior Member
3,875 posts

Joined: Jan 2003
From: SJ


QUOTE(charge-n-go @ Apr 4 2006, 08:03 PM)
I've tried this actually:

add_result <= A+B;
reg <= add_result( 15 downto 8);

But using this method, A+B will be stored in add_result upon clock, and the previous clock add_result will be input into reg.

*
ok, then update 'reg' outside of the clk event(after the end process statement)
it should save u 1 clk cycle
e-jump
post Apr 4 2006, 08:25 PM

┐( ¯3¯)┌
*******
Senior Member
4,784 posts

Joined: Sep 2004
From: MY



Load A , Load B
A+B <- clock cycle
add_result <= A+B
reg <= add_result( 15 downto 8) <- clock cycle

1 cycle for A+B
1 cycle for store add_result to register

im rusty in this =___=
but how do we update the reg outside clock?
add_result will be sent directly to bus, thus tap bit 15-8 to reg?


oh well, reporting in smile.gif

This post has been edited by e-jump: Apr 4 2006, 08:43 PM
TScharge-n-go
post Apr 4 2006, 09:39 PM

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

Joined: Jan 2003
From: Penang / PJ

QUOTE(X10A Freedom @ Apr 4 2006, 08:09 PM)
ok, then update 'reg' outside of the clk event(after the end process statement)
it should save u 1 clk cycle
*
i tried b4, but the result isnt correct.

THis is actually my code description:


» Click to show Spoiler - click again to hide... «


Anyway, welcome e-jump biggrin.gif
QUOTE
but how do we update the reg outside clock?
add_result will be sent directly to bus, thus tap bit 15-8 to reg?

I dont think can update if there is no clock tongue.gif

This post has been edited by charge-n-go: Apr 4 2006, 09:40 PM
X10A Freedom
post Apr 4 2006, 10:48 PM

ZGMF-X20A Strike Freedom Gundam
*******
Senior Member
3,875 posts

Joined: Jan 2003
From: SJ


QUOTE(e-jump @ Apr 4 2006, 08:25 PM)
Load A , Load B
A+B <- clock cycle
add_result <= A+B
reg <= add_result( 15 downto 8) <- clock cycle

1 cycle for A+B
1 cycle for store add_result to register

im rusty in this =___=
but how do we update the reg outside clock?
add_result will be sent directly to bus, thus tap bit 15-8 to reg?
oh well, reporting in smile.gif
*
depending on synthesis tools, most A+B function doesn't need any clock at all(that boils down to what u intend this to do, a counter? or an adder?)
so the remainding clk cycle is waste on add_result <= A+B
the reason i say remove the

reg <= add_result( 15 downto 8)

and put it at outside is so that u won't incur another clk cycle just to tap a signal bus and pass it to an output
but putting outside of the process statement, it means tapping of the internal signal to the specified output
QUOTE(charge-n-go @ Apr 4 2006, 09:39 PM)
i tried b4, but the result isnt correct.

THis is actually my code description:
» Click to show Spoiler - click again to hide... «


Anyway, welcome e-jump biggrin.gif

I dont think can update if there is no clock tongue.gif
*
wierd.....it should work since

add_result <= A+B;

so by just putting this code

reg <= add_result( 15 downto 8);

at outside of the process statement will meant that you are tapping the 15 downto 8 bus to 'reg'
e-jump
post Apr 4 2006, 11:14 PM

┐( ¯3¯)┌
*******
Senior Member
4,784 posts

Joined: Sep 2004
From: MY



afaik, registers dont need clock to update
we can assign bit load and bit clear

bit load enable = load reg content to bus
bit clear enable = clear content

amirite?
X10A Freedom
post Apr 4 2006, 11:22 PM

ZGMF-X20A Strike Freedom Gundam
*******
Senior Member
3,875 posts

Joined: Jan 2003
From: SJ


QUOTE(e-jump @ Apr 4 2006, 11:14 PM)
afaik, registers dont need clock to update
we can assign bit load and bit clear

bit load enable = load reg content to bus
bit clear enable = clear content

amirite?
*
its the same as clk
clk is just train of pulses and the register updates at every pulse
normally when we refer to update according to clk, we meant that the registers are edge triggerred circuits

ikanayam
post Apr 4 2006, 11:26 PM

there are no pacts between fish and men
********
Senior Member
10,544 posts

Joined: Jan 2003
From: GMT +8:00

QUOTE(e-jump @ Apr 4 2006, 10:14 AM)
afaik, registers dont need clock to update
we can assign bit load and bit clear
*
Yes you can do that.

QUOTE(X10A Freedom @ Apr 4 2006, 10:22 AM)
its the same as clk
clk is just train of pulses and the register updates at every pulse
normally when we refer to update according to clk, we meant that the registers are edge triggerred circuits
*
You mean a synchronous circuit? they can be still edge triggered asynchronously like above

This post has been edited by ikanayam: Apr 4 2006, 11:27 PM
TScharge-n-go
post Apr 4 2006, 11:30 PM

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

Joined: Jan 2003
From: Penang / PJ

QUOTE(X10A Freedom @ Apr 4 2006, 10:48 PM)
wierd.....it should work since

add_result <= A+B;

so by just putting this code

reg <= add_result( 15 downto 8);

at outside of the process statement will meant that you are tapping the 15 downto 8 bus to 'reg'
*
Outside process statement ar. I nv tried, that tongue.gif
I just put it in process, but included in the ELSE branch (else when no clock signal then reg <= add_result (15 downto 8);

I think maybe I should construct another CASE statement out of the process and try again. Thanx for all yr help rclxms.gif


Hmm... i think i'll try agian, maybe some other parts are wrong tongue.gif
X10A Freedom
post Apr 4 2006, 11:33 PM

ZGMF-X20A Strike Freedom Gundam
*******
Senior Member
3,875 posts

Joined: Jan 2003
From: SJ


QUOTE(ikanayam @ Apr 4 2006, 11:26 PM)
Yes you can do that.
You mean a synchronous circuit? they can be still edge triggered asynchronously like above
*
no, i meant registers in general
there aren't any registers that consist of latch though(dun count in pulsed latch) which are level sensitive circuits

TScharge-n-go
post Apr 4 2006, 11:34 PM

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

Joined: Jan 2003
From: Penang / PJ

QUOTE(X10A Freedom @ Apr 4 2006, 11:33 PM)
no, i meant registers in general
there aren't any registers that consist of latch though(dun count in pulsed latch) which are level sensitive circuits
*
haha, i got 1 level sensitive transistor, but never use it bcoz it's pretty useless tongue.gif
harrychoo
post Apr 5 2006, 12:29 AM

Look at all my stars!!
*******
Senior Member
3,589 posts

Joined: Mar 2005
From: Bolehland


how about do like this? having two process?

» Click to show Spoiler - click again to hide... «

iZuDeeN
post Apr 6 2006, 09:39 PM

Look at all my stars!!
*******
Senior Member
3,466 posts

Joined: Jan 2003
From: PJ, Malaysia
Hey since I dont get any response in Education forum... can someone enlighten me on this

QUOTE(iZuDeeN @ Apr 6 2006, 07:10 PM)
Okay...

I need you guys opinion here.
" IS THERE SUCH THING AS NEGATIVE RESISTENSE?"

Since high school and 4 years in University, the basic thing I learned about resistence is that there is NO MATERIAL in this world that can give -ve resistence i.e you get -ve ohm in multimeter.

If you get such reading in first place, it is either that you have not calibrated your multimeter or the multimeter is faulty...
But in technical explaination, if you get -ve reading it means that the material you are testing is GIVING OUT energy, i.e generating its own energy, and Im not referring to dry cells or any other type of batteries.

A friend of mine was taking a reading of a wire (basically a grounding wire), and he got -ve reading. When I told him that his reading was wrong, he said that the reading is correct and it read -ve because the material is very good. The reading although only read -0.4ohm, it still makes a lot of difference in my line of job.

So I need you guys professional opinion whether the reading taken by my friend is correct and Im wrong or vice versa?
Note that this is not to prove who is right or wrong, but it is important that an accurate reading is taken due to the nature of job...
*
SUSDavid83
post Apr 6 2006, 09:43 PM

20k VIP Club
*********
All Stars
52,874 posts

Joined: Jan 2003
Never come across that. Just heard about negative temperature coefficient in Ohm's Law.

Perhaps superconductor might behave like that.

Interested to know about this too ...

This post has been edited by David83: Apr 6 2006, 09:45 PM
SUSDavid83
post Apr 6 2006, 09:43 PM

20k VIP Club
*********
All Stars
52,874 posts

Joined: Jan 2003
-deleted-

Sorry double post due to line problem. notworthy.gif

This post has been edited by David83: Apr 6 2006, 09:44 PM
TScharge-n-go
post Apr 6 2006, 09:47 PM

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

Joined: Jan 2003
From: Penang / PJ

QUOTE(harrychoo @ Apr 5 2006, 12:29 AM)
how about do like this? having two process?
My fren tried, but not really working tongue.gif
nvm, i'll try another method.

thx everybody for helping.


QUOTE(iZuDeeN @ Apr 6 2006, 09:39 PM)
Hey since I dont get any response in Education forum... can someone enlighten me on this
*
i only learnt about 0 resistance, which happens to superconductor at very very low temperature. -ve resistance? i need somebody to enlighten me too biggrin.gif
SUSDavid83
post Apr 6 2006, 09:52 PM

20k VIP Club
*********
All Stars
52,874 posts

Joined: Jan 2003
QUOTE(charge-n-go @ Apr 6 2006, 09:47 PM)
My fren tried, but not really working tongue.gif
nvm, i'll try another method.

thx everybody for helping.
i only learnt about 0 resistance, which happens to superconductor at very very low temperature. -ve resistance? i need somebody to enlighten me too  biggrin.gif
*
Share with us regarding the 0 resistance too. notworthy.gif
iZuDeeN
post Apr 6 2006, 09:58 PM

Look at all my stars!!
*******
Senior Member
3,466 posts

Joined: Jan 2003
From: PJ, Malaysia
Yes, that is the reason I need someone to tell me.

The is Negative Differential Resistance but there is no such thing as Negative Resistance...

Negative Differential Resistance still has a +ve static resistance.


And yes, 0 resistance is the ideal condition but it is almost impossible to achieve with current material that we have...

But a grounding wire has -ve resistance? That simply amaze me...




33 Pages « < 18 19 20 21 22 > » Top
 

Change to:
| Lo-Fi Version
0.0248sec    0.39    6 queries    GZIP Disabled
Time is now: 22nd December 2025 - 08:46 AM