- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Problem to Generate code with System Generator
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-17-2010 02:45 AM
hi,
ich have a big problem to Generate a VHDL code From Mcode, ich wrote a Simple Program for test.the Program is a Single Port RAM like This :
proto={xlSigned,nbits,binpt}
persistent mem,mem=xl_state(zeros (1,depth),porto);
dout=mem(addr);
if we
mem(addr)=din;
end
the Programm works on the Simultion under Simulink (with xilin Mcode Block) no problems, but when i want to create a VHDL code with systemgenrator it shows me this Message:
Cannot map persistent variable mem to hardware possibly because: encountered method subref at line 64:21, the subref is invoked before this point. Please reference user manual.
Thank you for your help!
Solved! Go to Solution.
Re: Problem to Generate code with System Generator
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2010 07:05 AM
Hi,
I have the same problem with M-CODE, I always get this error
Cannot map persistent variable mem to hardware possibly because: encountered method subref at line 9:14, the subref is invoked before this point. Please reference user manual.
I try to read with another index
the Code:
function [dout] = ram(addr, we, din, depth, nbits, binpt)
proto = {xlSigned, nbits, binpt};
persistent mem, mem = xl_state(zeros(1, depth), proto);
dout = mem(100);
if we==1
mem(addr) = din;
end
thanks for the help.
Re: Problem to Generate code with System Generator
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-03-2010 06:49 AM
Hi this is my problem too.
when I try to use the addrsr (sample code of xilinx for addressable shift register with M_Code block) this error occurred.
when I changed compilation type in system generator configuration to bitstream it worked.
:smileyhappy:











