Thread Subject:
content of a buffer

Subject: content of a buffer

From: Owen

Date: 6 Sep, 2012 15:00:08

Message: 1 of 5

Hi,

I want to do the following with Simulink but somehow I cannot find the direction.

I have a 32 bit buffer which accepts data bit by bit at its input. The buffer should give out a trigger signal if its content is 0x12345678. Could anybody give me some hints on which blocks can be used?

Thanks
Senmeis

Subject: content of a buffer

From: Phil Goddard

Date: 7 Sep, 2012 01:51:08

Message: 2 of 5

The buffer block (assuming you mean the one in the Signal Processing Blockset) doesn't have any functionality to check what's in the buffer -- you'll need to write that.

I suspect the easiest way would be to feed the output of the buffer into a MATLAB Fcn Block, then within that block write the code to check the buffer contents and output a (most likely) boolean signal, then use that signal as a rising edge trigger.

Phil.

Subject: content of a buffer

From: Navan Ruthramoorthy

Date: 7 Sep, 2012 19:35:07

Message: 3 of 5

Hi Owen,

You can use Delay Line block in Signal processing blockset which can output all the values stored. Make sure you set "Allow directfeedthrough" option to get current values of input
in the output at the current time step.

Navan

"Owen" wrote in message <k2adpo$2ov$1@newscl01ah.mathworks.com>...
> Hi,
>
> I want to do the following with Simulink but somehow I cannot find the direction.
>
> I have a 32 bit buffer which accepts data bit by bit at its input. The buffer should give out a trigger signal if its content is 0x12345678. Could anybody give me some hints on which blocks can be used?
>
> Thanks
> Senmeis

Subject: content of a buffer

From: Owen

Date: 9 Sep, 2012 14:21:07

Message: 4 of 5

Thanks, I’ll try both ways. I tried the Buffer block with the length 32 before, but as far as I remember, this buffer receives whole 32 bit at one time and then another 32 bit, not one bit as expected. That’s just the biggest problem I am meeting.

Senmeis

"Navan Ruthramoorthy" wrote in message <k2di9b$3po$1@newscl01ah.mathworks.com>...
> Hi Owen,
>
> You can use Delay Line block in Signal processing blockset which can output all the values stored. Make sure you set "Allow directfeedthrough" option to get current values of input
> in the output at the current time step.
>
> Navan
>
> "Owen" wrote in message <k2adpo$2ov$1@newscl01ah.mathworks.com>...
> > Hi,
> >
> > I want to do the following with Simulink but somehow I cannot find the direction.
> >
> > I have a 32 bit buffer which accepts data bit by bit at its input. The buffer should give out a trigger signal if its content is 0x12345678. Could anybody give me some hints on which blocks can be used?
> >
> > Thanks
> > Senmeis

Subject: content of a buffer

From: Phil Goddard

Date: 9 Sep, 2012 17:34:08

Message: 5 of 5

Assuming the input is a single bit, and the buffer overlap is set to N-1 (for an N element buffer) then each new bit will replace just one bit in the buffer.

Phil.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
buffer Owen 6 Sep, 2012 11:04:11
bit shift Owen 6 Sep, 2012 11:04:11
simulink Owen 6 Sep, 2012 11:04:11
rssFeed for this Thread

Contact us