home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / vhdl / 379 < prev    next >
Encoding:
Text File  |  1992-07-28  |  2.3 KB  |  83 lines

  1. Newsgroups: comp.lang.vhdl
  2. Path: sparky!uunet!super!fross
  3. From: fross@super.org (Bradley Kendall Fross)
  4. Subject: Synopsys C-BMOD Interface Question
  5. Message-ID: <1992Jul28.160335.17144@super.org>
  6. Sender: news@super.org (USENET News System)
  7. Nntp-Posting-Host: b117c
  8. Organization: Supercomputing Research Center (Bowie, MD)
  9. Date: Tue, 28 Jul 1992 16:03:35 GMT
  10. Lines: 71
  11.  
  12.  
  13. I am using Synopsys, Inc.'s C-Behavioral Models Interface, and am running 
  14. into trouble utilizing some of the routines for pin arrays.  The problem
  15. arises when I use the sbmod_SetPinArrayLong().  
  16.  
  17. The syntax I use is very similar that in the "Synopsys VHDL System Simulator
  18. Interfaces Manual", section 4, page 74, and is as follows:
  19.  
  20. ====
  21. %BMOD_INFO
  22.     name    foo
  23.     parm    integer    NUMBITS    32
  24.     port    output  INDATA  event   -    NUMBITS
  25.     port    input   OUTDATA event   -    NUMBITS
  26.         ptr    long    array_ptr
  27. %%
  28. %BMOD_NOTE
  29. %%
  30. %BMOD_CODE
  31.  
  32. #include "bmod.h"
  33. #include <stdio.h>
  34. #include "cstyle2.h"
  35. #include "bbus.h"
  36.  
  37. sbmod_foo_event()
  38. {
  39.   sbmod_iGetPinArrayLong(OUTDATA,array_ptr);
  40.   printf("array_ptr value %08x\n",array_ptr[0]);
  41.   sbmod_SetPinArrayLong(INDATA,array_ptr);
  42. }
  43.  
  44. sbmod_foo_open() {
  45.   array_ptr = sbmod_plAllocateBMODMemory(4); /* 4 bytes allocated */
  46. }
  47.  
  48. sbmod_foo_close() {}
  49. sbmod_foo_restart() {}
  50. sbmod_foo_error() {}
  51.  
  52. %%
  53.  
  54. ====
  55. The error run-time message I get from the simulator is:
  56.  
  57. **Error: vhdlsim,9997:
  58.     The second argument of sbmod_SetPinArrayLong must be an array.
  59.  
  60. The thing that seems strange to me is that sbmod_iGetPinArrayLong()
  61. did not complain about the fact that I used the very same array as
  62. in sbmod_SetPinArrayLong().  In fact, sbmod_iGetPinArrayLong() works
  63. just fine, and the value displayed by the printf() is what I expected.
  64.  
  65. I am using the default MVL7_VECTOR in my structural vhdl code for the
  66. component "foo" port map, and I think the number of bits here matches 
  67. the NUMBITS parameter in the BMOD_INFO section of "foo.bmod" okay:
  68.  
  69. I used:  
  70.     INDATA: MVL7_VECTOR(31 downto 0);
  71.     OUTDATA: MVL7_VECTOR(31 downto 0);
  72.  
  73. Is the problem with the way I am using this sbmod_SetPinArrayLong()
  74. routine, or is the problem somewhere else?
  75.  
  76. I would appreciate any assistance from any Synopsys C-BMOD users,
  77. especially if you have working C_BMOD code I could peruse.
  78.  
  79. Thanks in advance.
  80.  
  81. Brad Fross (fross@super.org)
  82. Supercomputing Research Center
  83.