All About Circuits Forum  

Go Back   All About Circuits Forum > Software, Microcomputing, and Communications Forums > Programmer's Corner

Notices

Programmer's Corner Discussion forum for all aspects of programming and software engineering. Any software programming language welcome: C, C++, C#, Fortran, Java, Matlab, etc.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 05-25-2009, 04:48 PM
wantanjung wantanjung is offline
New Member
 
Join Date: May 2009
Location: Singapore GMT + 8
Posts: 6
Default VHDL: How to index a std logic vector

Dear guys,

I need some help programming VHDL.

I need to break up a 8bit binary data to 2 4-bit data. Below is a glimpse of the code:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use ieee.numeric_std.all;
use work.CharLoopController.all;


entity Sub_prog_test is
Port ( en,reset,DisplayData,clk : in STD_LOGIC;
Data: in STD_LOGIC_VECTOR (7 downto 0);
);
end Sub_prog_test;

architecture Behavioral of Sub_prog_test is

begin

process (clk,en,reset)

variable upper_4bit, lower_4bit: std_logic_vector (3 downto 0);

--------------------Some statement-------------------------
.....................

upper_4bit<=Data(7)& Data(6)& Data(5)& Data(4);
lower_4bit<=Data(3)& Data(2)& Data(1)& Data(0);

However, when i do this, i get an error: "Wrong index type for Data."

Please help

Ridwan
Reply With Quote
  #2  
Old 05-27-2009, 05:09 PM
wantanjung wantanjung is offline
New Member
 
Join Date: May 2009
Location: Singapore GMT + 8
Posts: 6
Default Solution found

Hi guys..

Realised my own mistake. Accidently named 2 variables similarly: 1 is data, other is Data. After changing Data to a new name: DataVar, everything went ok.

Shucks.. I thought VHDL syntax was case sensitive.

Best Regards

Ridwan
Reply With Quote
  #3  
Old 10-20-2009, 02:49 AM
u0508933 u0508933 is offline
New Member
 
Join Date: Oct 2009
Posts: 1
Default Help with Programming

Hi,

i am a final year engineering student and i am seeking your help. I am required to design a Mesh Fabric Reference Design using VHDL programming.

please refer to the following document.

http://www.xilinx.com/support/docume...es/xapp698.pdf

sample source code is not available for this and i have to design this from scratch. Would you be willing to help me. There will be good incentives. Please reply if interested. Thanks.
Reply With Quote
  #4  
Old 10-20-2009, 06:27 PM
ridsudcre ridsudcre is offline
New Member
 
Join Date: Oct 2009
Posts: 1
Default

Oh man, this game is pretty sweet. Why can't more games have cutscenes that you want to see more of?

__________________
Conseil financement ********** travaux | Plan de financement credit immo | Calcul financement **********
Reply With Quote
Reply   Post New Thread

Tags
, , , ,


Related Site Pages
Section Title
Textbook Parallel-in, parallel-out, universal shift register : Shift Registers
Textbook Serial-in, parallel-out shift register : Shift Registers


Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Scramble Numbers On These Tables? hopestar Off-Topic 5 04-18-2009 04:40 AM
Saving a vector to a binary file mentaaal Programmer's Corner 5 11-28-2008 09:45 PM
Treatise about Voltage Ratch Physics 100 05-18-2008 07:55 AM
vector braddy Physics 2 09-29-2006 01:07 AM

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:57 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.