- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Putting my code into the FPGA
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 11:21 AM
Hi..
so with the help of eteam00 I was able get my first code working.. however I had a much simplified version and here it is:
module led_simple(
input clock,
input reset,
output led
);
reg [26:0] count;
always@ (posedge clock or posedge reset)
begin
if (reset)
count <= 0;
else
count <= count + 1;
end
assign led = count[26];
endmodule
I now want to add this code to my Spartan3E device aso that I can see it in action.
I just dont know hpw to get the programming file.
first I added a ucf file and with the help of the manuals made this .ucf file and added it to the project:
# Pin assignment for LEDs NET "led" LOC = "m5" ; # Pin assignment for pushbutton switches NET "reset" LOC = "a7"; # Pin assignment for clock NET "clock" LOC = "b8";
here is what I did..
I clicked implementation..
>> Clicked implement design..
>> but got an error in map
ERROR:MapLib:30 - LOC constraint B8 on clock is invalid: No such site on the device. To bypass this error set the environment variable 'XIL_MAP_LOCWARN'. ERROR:MapLib:30 - LOC constraint M5 on led is invalid: No such site on the device. To bypass this error set the environment variable 'XIL_MAP_LOCWARN'. ERROR:MapLib:30 - LOC constraint A7 on reset is invalid: No such site on the device. To bypass this error set the environment variable 'XIL_MAP_LOCWARN'.
I cant make sennse of this error and im stuck now.. :(
help please
Solved! Go to Solution.
Re: Putting my code into the FPGA
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 11:49 AM - edited 06-03-2012 11:50 AM
What device and package do you have selected for your design? For the Basys2 board, it should be
- Spartan3E family
- XC3S250E device
- CP132 package
-- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: Putting my code into the FPGA
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 12:44 PM
Thank you that got the map problems fixed..
ill try to program my device now for the first time =D
ill post here any updates
Re: Putting my code into the FPGA
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 12:53 PM
alright.. so after I loaded up the program and before programming I got this error..
its attached..
is it serious? should I continue with it anyway?
Thanks
Re: Putting my code into the FPGA
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 01:03 PM - edited 06-03-2012 01:04 PM
so after I loaded up the program
What do you mean by 'loaded up the program' ?
and before programming I got this error
Please try to be very specific. Details are important.
- What software program (or software tool) are you running? Include version, and operating system you are using.
- What are you trying to do? (example: program FPGA, program flash memory, verify JTAG product ID, etc.)
- What were the steps which led to the error? (if iMPACT, there should be a console log)
-- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: Putting my code into the FPGA
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 01:35 PM
sorry, by loaded up I meant using the browse button and selecting the bit file..
and as soon as I pressed the program button i got the above error..
- I using digilent Adept, windows XP
- am trying to program the fpga with my counter program.
- screenshot attached of the software used
Re: Putting my code into the FPGA
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 01:51 PM
Sorry, cannot help...
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 01:54 PM - edited 06-03-2012 02:31 PM
I am completely unfamiliar with the use of the Digilent Adept tool. There are many folks who use this tool who are better prepared to help you than I, at this point.
Good luck to you....
-- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: Sorry, cannot help...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-03-2012 04:31 PM
I found the solution..
When building the project make sure that the startup clock is set appropriately. You can do this in Project Navigator by right clicking on the "Generate Program File" process. Select Properties and then click Startup Options. Set the startup clock to JTAG-CLK or CCLK as appropriate.
and finally I was able to program my device and have my blinking LED..
lol.. i dont know why Im so excited at making an LED blink -.-











