home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.vhdl
- Path: sparky!uunet!super!fross
- From: fross@super.org (Bradley Kendall Fross)
- Subject: Synopsys C-BMOD Interface Question
- Message-ID: <1992Jul28.160335.17144@super.org>
- Sender: news@super.org (USENET News System)
- Nntp-Posting-Host: b117c
- Organization: Supercomputing Research Center (Bowie, MD)
- Date: Tue, 28 Jul 1992 16:03:35 GMT
- Lines: 71
-
-
- I am using Synopsys, Inc.'s C-Behavioral Models Interface, and am running
- into trouble utilizing some of the routines for pin arrays. The problem
- arises when I use the sbmod_SetPinArrayLong().
-
- The syntax I use is very similar that in the "Synopsys VHDL System Simulator
- Interfaces Manual", section 4, page 74, and is as follows:
-
- ====
- %BMOD_INFO
- name foo
- parm integer NUMBITS 32
- port output INDATA event - NUMBITS
- port input OUTDATA event - NUMBITS
- ptr long array_ptr
- %%
- %BMOD_NOTE
- %%
- %BMOD_CODE
-
- #include "bmod.h"
- #include <stdio.h>
- #include "cstyle2.h"
- #include "bbus.h"
-
- sbmod_foo_event()
- {
- sbmod_iGetPinArrayLong(OUTDATA,array_ptr);
- printf("array_ptr value %08x\n",array_ptr[0]);
- sbmod_SetPinArrayLong(INDATA,array_ptr);
- }
-
- sbmod_foo_open() {
- array_ptr = sbmod_plAllocateBMODMemory(4); /* 4 bytes allocated */
- }
-
- sbmod_foo_close() {}
- sbmod_foo_restart() {}
- sbmod_foo_error() {}
-
- %%
-
- ====
- The error run-time message I get from the simulator is:
-
- **Error: vhdlsim,9997:
- The second argument of sbmod_SetPinArrayLong must be an array.
-
- The thing that seems strange to me is that sbmod_iGetPinArrayLong()
- did not complain about the fact that I used the very same array as
- in sbmod_SetPinArrayLong(). In fact, sbmod_iGetPinArrayLong() works
- just fine, and the value displayed by the printf() is what I expected.
-
- I am using the default MVL7_VECTOR in my structural vhdl code for the
- component "foo" port map, and I think the number of bits here matches
- the NUMBITS parameter in the BMOD_INFO section of "foo.bmod" okay:
-
- I used:
- INDATA: MVL7_VECTOR(31 downto 0);
- OUTDATA: MVL7_VECTOR(31 downto 0);
-
- Is the problem with the way I am using this sbmod_SetPinArrayLong()
- routine, or is the problem somewhere else?
-
- I would appreciate any assistance from any Synopsys C-BMOD users,
- especially if you have working C_BMOD code I could peruse.
-
- Thanks in advance.
-
- Brad Fross (fross@super.org)
- Supercomputing Research Center
-