Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
farazk86
Posts: 40
Registered: ‎05-30-2012
0
Accepted Solution

Putting my code into the FPGA

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

Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009

Re: Putting my code into the FPGA

[ Edited ]

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

SIGNATURE:
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.
Visitor
farazk86
Posts: 40
Registered: ‎05-30-2012
0

Re: Putting my code into the FPGA

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

Visitor
farazk86
Posts: 40
Registered: ‎05-30-2012
0

Re: Putting my code into the FPGA

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

warning.jpg
Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: Putting my code into the FPGA

[ Edited ]

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

SIGNATURE:
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.
Visitor
farazk86
Posts: 40
Registered: ‎05-30-2012
0

Re: Putting my code into the FPGA

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

12.jpg
Visitor
farazk86
Posts: 40
Registered: ‎05-30-2012
0

Re: Putting my code into the FPGA

also.. I changed the device to XC3S100E accordingly
Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Sorry, cannot help...

[ Edited ]

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

SIGNATURE:
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.
Visitor
farazk86
Posts: 40
Registered: ‎05-30-2012
0

Re: Sorry, cannot help...

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 -.-