FMF Models usage

D

devices

Guest
I'm trying to integrate the at25320a model in the Ise Simulator. I created
the FMF Libray and added gen_utils.vhd and conversion.vhd. "at25320a.vhd" is
part of the top level, it's not in the
test bench vhdl file.

The compiler doesn't complain. But "Running Fuse ..."

i get several warnings and 2 errors

WARNING:HDLParsers:3502 - File
"J:/I.31/env/TOS/HDLPkgs/vhdl/vital2000/restricted/timing_b.vhd" which file
"..../gen_utils.vhd" depends on is modified, but has not been compiled. You
may need to compile ..../timing_b.vhd first.

the same warnings are reported for "prmtvs.vhd"


ERROR:Simulator:170 - FMF/gen_utils is not compiled properly. Please
recompile
FMF/gen_utils in file "" without -incremental option.

ERROR:Simulator:199 - Failed when handling dependencies for entity tb_board,
architecture testbench_arch

I have no "J:" drive other than the CDRom (empty)

Is Vital 2000 not installed in 8.2i or do i miss something?
 
In ModelSim, there is much confusion because the IEEE library contains
VITAL'95 rather than VITAL2000. The fix is to change the modelsim.ini
file to point IEEE to vital2000. You may have already done that.
Somehow, your simulator seems to think the VITAL library has not been
compiled yet. I am guessing this is a configuration (not the VHDL type)
issue.

Is ISE based on ModelSim?

Rick Munden


devices wrote:
I'm trying to integrate the at25320a model in the Ise Simulator. I created
the FMF Libray and added gen_utils.vhd and conversion.vhd. "at25320a.vhd" is
part of the top level, it's not in the
test bench vhdl file.

The compiler doesn't complain. But "Running Fuse ..."

i get several warnings and 2 errors

WARNING:HDLParsers:3502 - File
"J:/I.31/env/TOS/HDLPkgs/vhdl/vital2000/restricted/timing_b.vhd" which file
"..../gen_utils.vhd" depends on is modified, but has not been compiled. You
may need to compile ..../timing_b.vhd first.

the same warnings are reported for "prmtvs.vhd"


ERROR:Simulator:170 - FMF/gen_utils is not compiled properly. Please
recompile
FMF/gen_utils in file "" without -incremental option.

ERROR:Simulator:199 - Failed when handling dependencies for entity tb_board,
architecture testbench_arch

I have no "J:" drive other than the CDRom (empty)

Is Vital 2000 not installed in 8.2i or do i miss something?
 
ISE should support all the ModelSim editions, i guess.
But i'm using Xilinx "Ise Simulator" itself.

I did a Test:

I created a "simple" project where i only included
"gen_utils.vhd" and a "test entity" and called "GenParity"
in the beahavioural part of the entity.


CASE 1
gen_utils.vhd is part of the project (WORK)

snippet:

use gen_utils.all;
....
vo <= GenParity(vi, '0', 8);

CASE 2
i moved gen_utils.vhd to the library (FMF)

snippet:

library fmf;
use fmf.gen_utils.all;
....
vo <= GenParity(vi, '0', 8);

CASE 1 worked (though it gave me warnings, i don't remember for sure)
CASE 2 gave me the usual problems

By the Way
Some MMC or SD cards models would be useful ;)



"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:452C69E8.2030505@sbcglobal.net...
In ModelSim, there is much confusion because the IEEE library contains
VITAL'95 rather than VITAL2000. The fix is to change the modelsim.ini
file to point IEEE to vital2000. You may have already done that.
Somehow, your simulator seems to think the VITAL library has not been
compiled yet. I am guessing this is a configuration (not the VHDL type)
issue.

Is ISE based on ModelSim?

Rick Munden


devices wrote:
I'm trying to integrate the at25320a model in the Ise Simulator. I
created
the FMF Libray and added gen_utils.vhd and conversion.vhd.
"at25320a.vhd" is
part of the top level, it's not in the
test bench vhdl file.

The compiler doesn't complain. But "Running Fuse ..."

i get several warnings and 2 errors

WARNING:HDLParsers:3502 - File
"J:/I.31/env/TOS/HDLPkgs/vhdl/vital2000/restricted/timing_b.vhd" which
file
"..../gen_utils.vhd" depends on is modified, but has not been compiled.
You
may need to compile ..../timing_b.vhd first.

the same warnings are reported for "prmtvs.vhd"


ERROR:Simulator:170 - FMF/gen_utils is not compiled properly. Please
recompile
FMF/gen_utils in file "" without -incremental option.

ERROR:Simulator:199 - Failed when handling dependencies for entity
tb_board,
architecture testbench_arch

I have no "J:" drive other than the CDRom (empty)

Is Vital 2000 not installed in 8.2i or do i miss something?
 
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.

The compilation won't start if a file is not edited since the
last compilation. So in order to recompile everything
i'll have to select each file, insert a space ' ', remove the space
(backspace) save it and compile it. It's not quite like drinking
a glass of water. Ok maybe i miss (i hope) some option to
set up all this in an auto way.

By the way i was glad to see this error.

ERROR:Simulator:29 - at 0 ns : Could not open file 'at25320a.mem' of Text

It meant the simulation started at least

But now i realize that i never considered the format of such file.
I should take a look at the code and figure it out. I expect a
sequence of 4096 bytes. Integers or Ascii codes?



"devices" <me@home> wrote in message
news:452d60d4$0$5852$4fafbaef@reader3.news.tin.it...
ISE should support all the ModelSim editions, i guess.
But i'm using Xilinx "Ise Simulator" itself.

I did a Test:

I created a "simple" project where i only included
"gen_utils.vhd" and a "test entity" and called "GenParity"
in the beahavioural part of the entity.


CASE 1
gen_utils.vhd is part of the project (WORK)

snippet:

use gen_utils.all;
...
vo <= GenParity(vi, '0', 8);

CASE 2
i moved gen_utils.vhd to the library (FMF)

snippet:

library fmf;
use fmf.gen_utils.all;
...
vo <= GenParity(vi, '0', 8);

CASE 1 worked (though it gave me warnings, i don't remember for sure)
CASE 2 gave me the usual problems

By the Way
Some MMC or SD cards models would be useful ;)



"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:452C69E8.2030505@sbcglobal.net...
In ModelSim, there is much confusion because the IEEE library contains
VITAL'95 rather than VITAL2000. The fix is to change the modelsim.ini
file to point IEEE to vital2000. You may have already done that.
Somehow, your simulator seems to think the VITAL library has not been
compiled yet. I am guessing this is a configuration (not the VHDL type)
issue.

Is ISE based on ModelSim?

Rick Munden


devices wrote:
I'm trying to integrate the at25320a model in the Ise Simulator. I
created
the FMF Libray and added gen_utils.vhd and conversion.vhd.
"at25320a.vhd" is
part of the top level, it's not in the
test bench vhdl file.

The compiler doesn't complain. But "Running Fuse ..."

i get several warnings and 2 errors

WARNING:HDLParsers:3502 - File
"J:/I.31/env/TOS/HDLPkgs/vhdl/vital2000/restricted/timing_b.vhd" which
file
"..../gen_utils.vhd" depends on is modified, but has not been
compiled.
You
may need to compile ..../timing_b.vhd first.

the same warnings are reported for "prmtvs.vhd"


ERROR:Simulator:170 - FMF/gen_utils is not compiled properly. Please
recompile
FMF/gen_utils in file "" without -incremental option.

ERROR:Simulator:199 - Failed when handling dependencies for entity
tb_board,
architecture testbench_arch

I have no "J:" drive other than the CDRom (empty)

Is Vital 2000 not installed in 8.2i or do i miss something?
 
devices wrote:
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.
No, you should not need to recompile the whole chain. In general, the
first time through, everything needs to be compiled in the right order
(which is a real pain, I agree). After that, you should only need to
compile a file that has changed, and the next file down the list only if
something has changed in the entity.

But I will agree that sometimes that doesn't seem to work, or somewhere
I missed a step. For this reason, and so that I can recompile everything
from scratch, I tend to always have around a batch file (that I name
"compile") that explicitly recompiles everything in the right order.
That is, it is a list of commands:
vcom file1.vhd
vcom file2.vhd
....

Therefore, at the command line, I can do:
rm -rf work
vlib work
../compile

Those commands are of course from Modelsim on a Linux system, but you
could do the same on Windows and I assume the ISE simulator has similar
command line commands. Modelsim also has a build project menu command
that will perform a similar task, but I generally prefer the command line.
 
I would use a batch file, but i'm afraid that the GUI views wouldn't be
updated in accordance to reflect the state of the project. I also read
somewhere that it is possible to change the compilation order modifying an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator was aware
of it.

"Duane Clark" <junkmail@junkmail.com> wrote in message
news:kzRZg.16399$e66.15730@newssvr13.news.prodigy.com...
devices wrote:
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.

No, you should not need to recompile the whole chain. In general, the
first time through, everything needs to be compiled in the right order
(which is a real pain, I agree). After that, you should only need to
compile a file that has changed, and the next file down the list only if
something has changed in the entity.

But I will agree that sometimes that doesn't seem to work, or somewhere
I missed a step. For this reason, and so that I can recompile everything
from scratch, I tend to always have around a batch file (that I name
"compile") that explicitly recompiles everything in the right order.
That is, it is a list of commands:
vcom file1.vhd
vcom file2.vhd
...

Therefore, at the command line, I can do:
rm -rf work
vlib work
./compile

Those commands are of course from Modelsim on a Linux system, but you
could do the same on Windows and I assume the ISE simulator has similar
command line commands. Modelsim also has a build project menu command
that will perform a similar task, but I generally prefer the command line.
 
ModelSim has a vmake command that should do everything for you. I do
not use it so this may be just hearsay.

The .mem file format is documented in the model. Also see the FAQ on
the FMF website (www.FreeModelFoundry.com).

devices wrote:
I would use a batch file, but i'm afraid that the GUI views wouldn't be
updated in accordance to reflect the state of the project. I also read
somewhere that it is possible to change the compilation order modifying an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator was aware
of it.

"Duane Clark" <junkmail@junkmail.com> wrote in message
news:kzRZg.16399$e66.15730@newssvr13.news.prodigy.com...
devices wrote:
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.
No, you should not need to recompile the whole chain. In general, the
first time through, everything needs to be compiled in the right order
(which is a real pain, I agree). After that, you should only need to
compile a file that has changed, and the next file down the list only if
something has changed in the entity.

But I will agree that sometimes that doesn't seem to work, or somewhere
I missed a step. For this reason, and so that I can recompile everything
from scratch, I tend to always have around a batch file (that I name
"compile") that explicitly recompiles everything in the right order.
That is, it is a list of commands:
vcom file1.vhd
vcom file2.vhd
...

Therefore, at the command line, I can do:
rm -rf work
vlib work
./compile

Those commands are of course from Modelsim on a Linux system, but you
could do the same on Windows and I assume the ISE simulator has similar
command line commands. Modelsim also has a build project menu command
that will perform a similar task, but I generally prefer the command line.
 
devices wrote:
I would use a batch file, but i'm afraid that the GUI views wouldn't be
updated in accordance to reflect the state of the project. I also read
somewhere that it is possible to change the compilation order modifying an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator was aware
of it.
If you compile outside the gui, and then restart the simulation using
"restart -f", then the gui will indeed recognize the changes you have made.
 
"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:45442289.3070605@sbcglobal.net...
ModelSim has a vmake command that should do everything for you. I do
not use it so this may be just hearsay.
Fortunately after i compiled the chain in the right order i don't need to
recompile it all again... provided that every change i make doesn't involve
the library, i guess. I just get the usual warnings but it runs. I wrote a
basic state machine to perform a READ command through my SPI.vhd and i get
the expected values.


The .mem file format is documented in the model. Also see the FAQ on
the FMF website (www.FreeModelFoundry.com).
I've taken care of that. The notes in the model are almost all that is
needed to write the .mem file, but i had to take a look at MemPreload
process itself either. I was hoping i could write multiple data values on a
single line, but that's not allowed. It shouldn't be so hard to implement it
though.

Here my sample .mem file

/test
@000
19
@010
bb
@020
9a

I'm writing an SPI module to drive MMC or SD so, again, models for such
devices would be useful. I2C seeprom models like 24lcxx would also be useful
to test I2C master communication.
As far as i know only Denali's MMAV has some of those models, but MMAV is a
long way to go to get just a single model every once in a while.


devices wrote:
I would use a batch file, but i'm afraid that the GUI views wouldn't be
updated in accordance to reflect the state of the project. I also read
somewhere that it is possible to change the compilation order modifying
an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator was
aware
of it.

"Duane Clark" <junkmail@junkmail.com> wrote in message
news:kzRZg.16399$e66.15730@newssvr13.news.prodigy.com...
devices wrote:
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.
No, you should not need to recompile the whole chain. In general, the
first time through, everything needs to be compiled in the right order
(which is a real pain, I agree). After that, you should only need to
compile a file that has changed, and the next file down the list only
if
something has changed in the entity.

But I will agree that sometimes that doesn't seem to work, or somewhere
I missed a step. For this reason, and so that I can recompile
everything
from scratch, I tend to always have around a batch file (that I name
"compile") that explicitly recompiles everything in the right order.
That is, it is a list of commands:
vcom file1.vhd
vcom file2.vhd
...

Therefore, at the command line, I can do:
rm -rf work
vlib work
./compile

Those commands are of course from Modelsim on a Linux system, but you
could do the same on Windows and I assume the ISE simulator has similar
command line commands. Modelsim also has a build project menu command
that will perform a similar task, but I generally prefer the command
line.
 
"Duane Clark" <junkmail@junkmail.com> wrote in message
news:S961h.2166$s6.1611@newssvr11.news.prodigy.com...
devices wrote:
I would use a batch file, but i'm afraid that the GUI views wouldn't be
updated in accordance to reflect the state of the project. I also read
somewhere that it is possible to change the compilation order modifying
an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator was
aware
of it.

If you compile outside the gui, and then restart the simulation using
"restart -f", then the gui will indeed recognize the changes you have
made.

I don't know if i can issue a "restart -f" under Windows. Anyway this is not
so important as long as i'm not forced to recompile the whole chain on every
change and fortunately this is not the case (til now).
 
FMF wrote:
ModelSim has a vmake command that should do everything for you. I do
not use it so this may be just hearsay.
vmake creates a makefile, using info from the project library. You run
vmake from the shell command line _after_ you've compiled all of your
project sources into the library.

$ vmake > Makefile

Then you use make, again from a command line, to re-compile as need.

If you need to add sources to your project, you need to either
recompile everything using the GUI then re-run vmake, or modify the
Makefile by hand.

-a
 
I noticed a wierd behaviour in using the .mem file with "at25320a.vhd".

According to my custom mem file, location 0x20 of the eeprom contains 0x9a.

Here's the operations (assuming [0x20] already contains 0x9a)
WREN
WRITE 0xF0 to [0x20]
WAIT FOR 5.2ms
READ FROM [0x20]

the READ command gets 0x90!!!

It's like the initial value (0x9A) masks the new value in an AND fashion:
0x9A AND 0xF0 = 0x90
I tried other values, all were masked.
(ie 0x9A AND 0xFF = 0x9a)

I don't know if this has to do with the mem file itself. As you can see,
memory locations not initialized by the mem file default to 0xFF. Obviously
every new value is not masked in this case.

According to the datasheet at25320a's write cycle doesn't last more than 5ms
so i guess that the lack of 1's doesn't depend on that.



"devices" <me@home> wrote in message
news:454528bd$0$19231$4fafbaef@reader4.news.tin.it...
"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:45442289.3070605@sbcglobal.net...
ModelSim has a vmake command that should do everything for you. I do
not use it so this may be just hearsay.

Fortunately after i compiled the chain in the right order i don't need to
recompile it all again... provided that every change i make doesn't
involve
the library, i guess. I just get the usual warnings but it runs. I wrote a
basic state machine to perform a READ command through my SPI.vhd and i get
the expected values.


The .mem file format is documented in the model. Also see the FAQ on
the FMF website (www.FreeModelFoundry.com).

I've taken care of that. The notes in the model are almost all that is
needed to write the .mem file, but i had to take a look at MemPreload
process itself either. I was hoping i could write multiple data values on
a
single line, but that's not allowed. It shouldn't be so hard to implement
it
though.

Here my sample .mem file

/test
@000
19
@010
bb
@020
9a

I'm writing an SPI module to drive MMC or SD so, again, models for such
devices would be useful. I2C seeprom models like 24lcxx would also be
useful
to test I2C master communication.
As far as i know only Denali's MMAV has some of those models, but MMAV is
a
long way to go to get just a single model every once in a while.


devices wrote:
I would use a batch file, but i'm afraid that the GUI views wouldn't
be
updated in accordance to reflect the state of the project. I also read
somewhere that it is possible to change the compilation order
modifying
an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator was
aware
of it.

"Duane Clark" <junkmail@junkmail.com> wrote in message
news:kzRZg.16399$e66.15730@newssvr13.news.prodigy.com...
devices wrote:
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.
No, you should not need to recompile the whole chain. In general, the
first time through, everything needs to be compiled in the right
order
(which is a real pain, I agree). After that, you should only need to
compile a file that has changed, and the next file down the list only
if
something has changed in the entity.

But I will agree that sometimes that doesn't seem to work, or
somewhere
I missed a step. For this reason, and so that I can recompile
everything
from scratch, I tend to always have around a batch file (that I name
"compile") that explicitly recompiles everything in the right order.
That is, it is a list of commands:
vcom file1.vhd
vcom file2.vhd
...

Therefore, at the command line, I can do:
rm -rf work
vlib work
./compile

Those commands are of course from Modelsim on a Linux system, but you
could do the same on Windows and I assume the ISE simulator has
similar
command line commands. Modelsim also has a build project menu command
that will perform a similar task, but I generally prefer the command
line.
 
Doesn't that reflect the way the EEPROM actually behaves? You can write
zeros whenever you want but you have to erase to get ones.


devices wrote:
I noticed a wierd behaviour in using the .mem file with "at25320a.vhd".

According to my custom mem file, location 0x20 of the eeprom contains 0x9a.

Here's the operations (assuming [0x20] already contains 0x9a)
WREN
WRITE 0xF0 to [0x20]
WAIT FOR 5.2ms
READ FROM [0x20]

the READ command gets 0x90!!!

It's like the initial value (0x9A) masks the new value in an AND fashion:
0x9A AND 0xF0 = 0x90
I tried other values, all were masked.
(ie 0x9A AND 0xFF = 0x9a)

I don't know if this has to do with the mem file itself. As you can see,
memory locations not initialized by the mem file default to 0xFF. Obviously
every new value is not masked in this case.

According to the datasheet at25320a's write cycle doesn't last more than 5ms
so i guess that the lack of 1's doesn't depend on that.



"devices" <me@home> wrote in message
news:454528bd$0$19231$4fafbaef@reader4.news.tin.it...
"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:45442289.3070605@sbcglobal.net...
ModelSim has a vmake command that should do everything for you. I do
not use it so this may be just hearsay.
Fortunately after i compiled the chain in the right order i don't need to
recompile it all again... provided that every change i make doesn't
involve
the library, i guess. I just get the usual warnings but it runs. I wrote a
basic state machine to perform a READ command through my SPI.vhd and i get
the expected values.


The .mem file format is documented in the model. Also see the FAQ on
the FMF website (www.FreeModelFoundry.com).
I've taken care of that. The notes in the model are almost all that is
needed to write the .mem file, but i had to take a look at MemPreload
process itself either. I was hoping i could write multiple data values on
a
single line, but that's not allowed. It shouldn't be so hard to implement
it
though.

Here my sample .mem file

/test
@000
19
@010
bb
@020
9a

I'm writing an SPI module to drive MMC or SD so, again, models for such
devices would be useful. I2C seeprom models like 24lcxx would also be
useful
to test I2C master communication.
As far as i know only Denali's MMAV has some of those models, but MMAV is
a
long way to go to get just a single model every once in a while.


devices wrote:
I would use a batch file, but i'm afraid that the GUI views wouldn't
be
updated in accordance to reflect the state of the project. I also read
somewhere that it is possible to change the compilation order
modifying
an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator was
aware
of it.

"Duane Clark" <junkmail@junkmail.com> wrote in message
news:kzRZg.16399$e66.15730@newssvr13.news.prodigy.com...
devices wrote:
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.
No, you should not need to recompile the whole chain. In general, the
first time through, everything needs to be compiled in the right
order
(which is a real pain, I agree). After that, you should only need to
compile a file that has changed, and the next file down the list only
if
something has changed in the entity.

But I will agree that sometimes that doesn't seem to work, or
somewhere
I missed a step. For this reason, and so that I can recompile
everything
from scratch, I tend to always have around a batch file (that I name
"compile") that explicitly recompiles everything in the right order.
That is, it is a list of commands:
vcom file1.vhd
vcom file2.vhd
...

Therefore, at the command line, I can do:
rm -rf work
vlib work
./compile

Those commands are of course from Modelsim on a Linux system, but you
could do the same on Windows and I assume the ISE simulator has
similar
command line commands. Modelsim also has a build project menu command
that will perform a similar task, but I generally prefer the command
line.
 
This was the very first conclusion i came to, but since at25320a has no
ERASE command i guess that the WRITE command should perform an ERASE before
doing anything else (why would it take 5ms?) I used "real" 24LCxx SEEPROMs
and the WRITE command always worked without explicitly requiring an ERASE.

"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:D189h.24780$yl4.11700@newssvr12.news.prodigy.com...
Doesn't that reflect the way the EEPROM actually behaves? You can write
zeros whenever you want but you have to erase to get ones.


devices wrote:
I noticed a wierd behaviour in using the .mem file with "at25320a.vhd".

According to my custom mem file, location 0x20 of the eeprom contains
0x9a.

Here's the operations (assuming [0x20] already contains 0x9a)
WREN
WRITE 0xF0 to [0x20]
WAIT FOR 5.2ms
READ FROM [0x20]

the READ command gets 0x90!!!

It's like the initial value (0x9A) masks the new value in an AND
fashion:
0x9A AND 0xF0 = 0x90
I tried other values, all were masked.
(ie 0x9A AND 0xFF = 0x9a)

I don't know if this has to do with the mem file itself. As you can see,
memory locations not initialized by the mem file default to 0xFF.
Obviously
every new value is not masked in this case.

According to the datasheet at25320a's write cycle doesn't last more than
5ms
so i guess that the lack of 1's doesn't depend on that.



"devices" <me@home> wrote in message
news:454528bd$0$19231$4fafbaef@reader4.news.tin.it...
"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:45442289.3070605@sbcglobal.net...
ModelSim has a vmake command that should do everything for you. I do
not use it so this may be just hearsay.
Fortunately after i compiled the chain in the right order i don't need
to
recompile it all again... provided that every change i make doesn't
involve
the library, i guess. I just get the usual warnings but it runs. I
wrote a
basic state machine to perform a READ command through my SPI.vhd and i
get
the expected values.


The .mem file format is documented in the model. Also see the FAQ on
the FMF website (www.FreeModelFoundry.com).
I've taken care of that. The notes in the model are almost all that is
needed to write the .mem file, but i had to take a look at MemPreload
process itself either. I was hoping i could write multiple data values
on
a
single line, but that's not allowed. It shouldn't be so hard to
implement
it
though.

Here my sample .mem file

/test
@000
19
@010
bb
@020
9a

I'm writing an SPI module to drive MMC or SD so, again, models for such
devices would be useful. I2C seeprom models like 24lcxx would also be
useful
to test I2C master communication.
As far as i know only Denali's MMAV has some of those models, but MMAV
is
a
long way to go to get just a single model every once in a while.


devices wrote:
I would use a batch file, but i'm afraid that the GUI views wouldn't
be
updated in accordance to reflect the state of the project. I also
read
somewhere that it is possible to change the compilation order
modifying
an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator
was
aware
of it.

"Duane Clark" <junkmail@junkmail.com> wrote in message
news:kzRZg.16399$e66.15730@newssvr13.news.prodigy.com...
devices wrote:
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.
No, you should not need to recompile the whole chain. In general,
the
first time through, everything needs to be compiled in the right
order
(which is a real pain, I agree). After that, you should only need to
compile a file that has changed, and the next file down the list
only
if
something has changed in the entity.

But I will agree that sometimes that doesn't seem to work, or
somewhere
I missed a step. For this reason, and so that I can recompile
everything
from scratch, I tend to always have around a batch file (that I name
"compile") that explicitly recompiles everything in the right order.
That is, it is a list of commands:
vcom file1.vhd
vcom file2.vhd
...

Therefore, at the command line, I can do:
rm -rf work
vlib work
./compile

Those commands are of course from Modelsim on a Linux system, but
you
could do the same on Windows and I assume the ISE simulator has
similar
command line commands. Modelsim also has a build project menu
command
that will perform a similar task, but I generally prefer the command
line.
 
I see what you mean. I will look into this some more. Please contact
me through the email address on the FMF website.

Rick


devices wrote:
This was the very first conclusion i came to, but since at25320a has no
ERASE command i guess that the WRITE command should perform an ERASE before
doing anything else (why would it take 5ms?) I used "real" 24LCxx SEEPROMs
and the WRITE command always worked without explicitly requiring an ERASE.

"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:D189h.24780$yl4.11700@newssvr12.news.prodigy.com...
Doesn't that reflect the way the EEPROM actually behaves? You can write
zeros whenever you want but you have to erase to get ones.




devices wrote:
I noticed a wierd behaviour in using the .mem file with "at25320a.vhd".

According to my custom mem file, location 0x20 of the eeprom contains
0x9a.
Here's the operations (assuming [0x20] already contains 0x9a)
WREN
WRITE 0xF0 to [0x20]
WAIT FOR 5.2ms
READ FROM [0x20]

the READ command gets 0x90!!!

It's like the initial value (0x9A) masks the new value in an AND
fashion:
0x9A AND 0xF0 = 0x90
I tried other values, all were masked.
(ie 0x9A AND 0xFF = 0x9a)

I don't know if this has to do with the mem file itself. As you can see,
memory locations not initialized by the mem file default to 0xFF.
Obviously
every new value is not masked in this case.

According to the datasheet at25320a's write cycle doesn't last more than
5ms
so i guess that the lack of 1's doesn't depend on that.



"devices" <me@home> wrote in message
news:454528bd$0$19231$4fafbaef@reader4.news.tin.it...
"FMF" <fmfoundry@sbcglobal.net> wrote in message
news:45442289.3070605@sbcglobal.net...
ModelSim has a vmake command that should do everything for you. I do
not use it so this may be just hearsay.
Fortunately after i compiled the chain in the right order i don't need
to
recompile it all again... provided that every change i make doesn't
involve
the library, i guess. I just get the usual warnings but it runs. I
wrote a
basic state machine to perform a READ command through my SPI.vhd and i
get
the expected values.


The .mem file format is documented in the model. Also see the FAQ on
the FMF website (www.FreeModelFoundry.com).
I've taken care of that. The notes in the model are almost all that is
needed to write the .mem file, but i had to take a look at MemPreload
process itself either. I was hoping i could write multiple data values
on
a
single line, but that's not allowed. It shouldn't be so hard to
implement
it
though.

Here my sample .mem file

/test
@000
19
@010
bb
@020
9a

I'm writing an SPI module to drive MMC or SD so, again, models for such
devices would be useful. I2C seeprom models like 24lcxx would also be
useful
to test I2C master communication.
As far as i know only Denali's MMAV has some of those models, but MMAV
is
a
long way to go to get just a single model every once in a while.


devices wrote:
I would use a batch file, but i'm afraid that the GUI views wouldn't
be
updated in accordance to reflect the state of the project. I also
read
somewhere that it is possible to change the compilation order
modifying
an
".ini" file or something. I guess it is a "use it at your own risk"
solution. A batch file would give me more freedom if the Navigator
was
aware
of it.

"Duane Clark" <junkmail@junkmail.com> wrote in message
news:kzRZg.16399$e66.15730@newssvr13.news.prodigy.com...
devices wrote:
Tired of crosswords i decided to face the issue
with a little more patience. I "explicitly" compiled
the files in the following order

gen_utils.vhd (in the fmf library)
conversions.vhd (in the fmf library)
at25320a.vhd
spi.vhd
board.vhd
tb_board.vhd

Then i ran the "Ise Simulator". It finally worked.

I would expect an IDE to take care of the compilation order
or at least to let me enter the file names in the right order.
I'm afraid that every change i make i have to manually recompile
the whole chain.
No, you should not need to recompile the whole chain. In general,
the
first time through, everything needs to be compiled in the right
order
(which is a real pain, I agree). After that, you should only need to
compile a file that has changed, and the next file down the list
only
if
something has changed in the entity.

But I will agree that sometimes that doesn't seem to work, or
somewhere
I missed a step. For this reason, and so that I can recompile
everything
from scratch, I tend to always have around a batch file (that I name
"compile") that explicitly recompiles everything in the right order.
That is, it is a list of commands:
vcom file1.vhd
vcom file2.vhd
...

Therefore, at the command line, I can do:
rm -rf work
vlib work
./compile

Those commands are of course from Modelsim on a Linux system, but
you
could do the same on Windows and I assume the ISE simulator has
similar
command line commands. Modelsim also has a build project menu
command
that will perform a similar task, but I generally prefer the command
line.
 

Welcome to EDABoard.com

Sponsor

Back
Top