Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Division with std_logic_vector

 
Thread Tools Search this Thread
Old 03-04-2008, 06:37 AM   #1
Default Division with std_logic_vector


I need to implement a chaotic function in a design with VHDL. I use std_logic_vector signals and I need to implement 4 divisions. However, i recieve an error message saying: "Line 40. / can not have such operands in this context."

I use:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;



Can you please help me?


danell
danell is offline   Reply With Quote
Old 03-04-2008, 08:34 AM   #2
danell
Junior Member
 
Join Date: Mar 2008
Posts: 4
Default The code
This is the code i used:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity imp is
Port ( in1 : in STD_LOGIC_VECTOR (7 downto 0);
in2 : in STD_LOGIC_VECTOR (7 downto 0);
ies : in STD_LOGIC_VECTOR (7 downto 0));
end imp;

architecture Behavioral of imp is

begin

ies <= in1/in2;

end Behavioral;


danell
danell is offline   Reply With Quote
Old 03-10-2008, 12:23 PM   #3
danell
Junior Member
 
Join Date: Mar 2008
Posts: 4
Default
Please comment in any way my post. Is there any way I can implement a division using std_logic_vector?


danell
danell is offline   Reply With Quote
Old 03-10-2008, 03:07 PM   #4
jeppe
Senior Member
 
Join Date: Mar 2008
Location: Denmark
Posts: 245
Default Yes
Check this page: Division

This gives a more interactive presentation of division: Opar1

Jeppe


jeppe
jeppe is offline   Reply With Quote
Old 03-10-2008, 05:30 PM   #5
danell
Junior Member
 
Join Date: Mar 2008
Posts: 4
Default
Thank you jeppe!

I thought it was something like a spelling error, or a library I should have added. If I need to make a design, I think it is better to use the core generator from my Xilinx ISE...


danell
danell is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL differential equations, multiplication division by powers of 10 boer Hardware 0 04-24-2009 12:28 PM
Division by repeated multiplication VHDL stevebarly Software 0 05-21-2008 11:11 AM
Gi Hold Retail Division cafemingle@yahoo.se DVD Video 0 01-08-2008 01:21 AM
Fast Integer Division In Vhdl Vitrion Hardware 0 11-01-2007 07:33 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46