Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6780113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:28:02+00:00 2026-05-26T16:28:02+00:00

type dmemSpace is array(0 to 1023) of std_logic_vector(31 downto 0); signal dataMem : dmemSpace

  • 0
type dmemSpace is array(0 to 1023) of std_logic_vector(31 downto 0);
signal dataMem : dmemSpace := ( 
  400 => X"00000000",
  404 => X"00001000",
  408 => X"FFFFEFFF",
  others => X"00000000"
);

signal dAddr : std_logic_vector(31 downto 0);
signal check : integer; 


dAddr(31 downto 0) <= Addr(31 downto 2) & "00";  
check <= to_integer(unsigned(dAddr));
DataOut <= dataMem(to_integer(unsigned(dAddr))) when (check > 0); 

Its me again…. In working on a single cycle cpu and everything else works fine but this particular line in the memory.

DataOut <= dataMem(to_integer(unsigned(dAddr))) when (check > 0); 

I want to prevent an index out of bounds error for DataOut but this doesn’t work. Any ideas?

  • Check > 0 prevents all data from coming out.
  • Check >= 0 lets the error through… when the index that causes the exception is -4.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:28:03+00:00Added an answer on May 26, 2026 at 4:28 pm

    If you have it in a process, you need “dAddr” and “check” to be variables, or else you are taking two clock cycles based on whether or not the previous address was valid, not the one you are using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

type TDelphiSignature=record Signature:array [0..3] of LongWord; Version:string; end; const DelphiSignature:array [0..2] of TDelphiSignature=( (Signature:($384F3D26,$B83782C2,$034224F3,$833A9B17);Version:'Delphi
type myrec = record id:dWord; name:array[0..31] of WideChar; three:dword; count:dword; ShuXing:Single; ShuXing2:dword; ShuXing3:dWORD; end;
type Tmyclass = class(TObject) somearray: array of TSometype FBool: Boolean; Fint: Integer; Fstr: string;
Type expression of an array with M elements of type T is array(1...M,T) Then
TYPE *a = calloc(nelem, sizeof(TYPE)); It says unable to resolve identifier TYPE. What does
type TSomeRecord = Record field1: integer; field2: string; field3: boolean; End; var SomeRecord: TSomeRecord;
Type.GetFields() does not return fields in a particular order, but I want to sort
type(3,) returns the int type, while t = 3, type(t) returns the tuple type.
The type of each member of the structure usually has a default alignment i.e.each
The type of this function is T -> (T -> U) -> U .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.