Referencing bits within a register, using another register

I'm getting an odd error that I don't know how to handle.  I've extracted the relevant code below:
parameter NUM_REG = 9
input [7:0] spi_in,
output reg spi_in_ready, //this module is ready to receive data
output reg [7:0] spi_out,
output reg [(NUM_REG) * 8 - 1:0] register
spi_out <= register[spi_in*8 + 7: spi_in*8];
//error generated: "spi_in is not a constant"
I thought this was allowed... what am I missing? Is there a better means of doing this? The only alternative I see is a large case statement. Functional, but far from elegant!

nleahcim wrote:
As an update, I ran across this thread: http://www.edaboard.com/thread176046.html which suggests that, while you can use a register to specify the index of a single bit, you cannot use a register to specify a range of bits. This seems like an odd limitation to me.
That's not correct, at least not for Verilog 2001.  The problem with Verilog is that you can't use a variable for both ends of a range, i.e. on both sides of the colon in your code.
You have essentially:
  [variable + constant : variable]
and this is not allowed since "variable" appears on both sides of the colon.
You can do the equivalent however using the Verilog 2001 range syntax:
  [variable +: constant]
Where in this case the value of "variable" selects the least significant (rightmost) bit of the part select, and "constant" selects the width of the part select.
Another way is:
  [variable -: constant]
Where in this case the value of "variable" selects the most significant (leftmost) bit of the part select, and "constant" selects the width of the part select.
Note that since "constant is the width in bits, you don't want to subtract one like you would if you were calculating the two ends of the range.  i.e.
  [variable +: 8]
is equivalent to:
 [variable + 7 : variable]
and
  [variable -: 8]
is equivalent to:
  [variable : variable - 7]
 

Similar Messages

  • I have two pc, one with windows 7 professional and another with windows 8.1. I'm the only owner and user of both. One works with 32 bits and the other (windows 8.1) , 64 bits. Can I use acrobat standard XI in both pc's being the only usuary?

    Just in case. I have two pc's one with windows 7 professional (32 bits) and another with windows 8.1 (64 bits). Can I use, with one license, as I'm the owner and only user, acrobat standard XI?. Thank you in advance
    Francisco

    Yes, the license allows 2 installs for the owner's personal use. You can check this in the license agreement if you wish.

  • How to set client within SQL statement without using another pl/sql stmt.

    I have a following select statement
    SELECT SUM (w.prior_forecasted_costs + w.prior_committed_costs)
    FROM xxsuf.job_cost_summary_table w,
    apps.pa_periods p,
    pa.pa_resources bz,
    pa.pa_resource_list_members cz,
    pa.pa_tasks dz
    WHERE w.project_id = z.project_id
    AND w.task_id = dz.task_id
    AND dz.task_number '98000'
    AND w.resource_list_member_id = cz.resource_list_member_id
    AND cz.resource_id = bz.resource_id
    AND NOT EXISTS (SELECT NULL
    FROM pa.pa_tasks zz
    WHERE zz.parent_task_id = dz.task_id)
    AND w.resource_list_member_id != 1000
    AND p.period_name = w.pa_period
    AND p.current_pa_period_flag = 'Y'
    Above select statement uses pa_periods view which only works when I set my client using "exec DBMS_Application_Info.set_client_info(83);" in Toad or SQL*Plus session.
    I was wondering how can I achieve it within select statement. so that I don't have to use another PL/SQL statement to set my client. Is there anyway to set client with my org id within above select statement ?
    Please advise.
    --Rakesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You can simply create a function which calls dbms_application_info and use that in your sql statement as in
    SQL> create or replace function set_client_info (i_info varchar2)
       return varchar2
    as
    begin
       dbms_application_info.set_client_info (i_info);
       return i_info;
    end set_client_info;
    Function created.
    SQL> create or replace view v_emp
    as
      select * from emp where empno = to_number(sys_context('userenv','client_info'))
    View created.
    SQL> select ename from v_emp where set_client_info(7788) is not null
    ENAME    
    SCOTT    
    1 row selected.
    SQL> select ename from v_emp where set_client_info(7900) is not null
    ENAME    
    JAMES    
    1 row selected.

  • After use another itunes account Apps of old itunes account stay untouched[intact]

    If i HAVE ACCOUNT from Another country lets say CountryA, hence my country do not permits register in itunes, and have a credit card of a friendB in CountryA, what supposed to do: use this credit card[of a friendB] in my account or use/login to my friendB's itunes account and use his credit card? Both can be done...well what do?
    After use another itunes account Apps of old itunes account stay untouched[intact]?

    If have an account with credit card in itunes and buy apps for ipad-1 [PC-1], then login in this account from another PC-2 win, and want to install the same bought apps but for another ipad, ipad-2 then:
    needed reinsert credit card?
    prior bought apps needed re-buy them?
    may copy apps files.ipd files from PC-1 to PC-2 without buy them?

  • Irc account keeps disconnecting cannot use IM what is nick at the beginning of the name ..can i use another name ? thank you

    hello i am trying to set up instant messaging ....the account keeeps disconnecting after a few seconds and i cannot make it work
    it keeps saying nick ... what is nick at the beginning of the name ..can i use another name ?
    if i use mozilla for IRC what is the server name ?
    what other details do i need to type in ?
    Thunderbird is running on a single home PC which only has Open Suse 13.1 x64 linux on it ( no Windows )
    thank you

    'nick' is your nickname which you entered when you set up the IRC chat. You can register your nickname by entering "/msg nickserv register <password> <email address>"
    Then when you start next time enter "/msg nickserv identify <password>"
    You can get a list of nickserv commands by entering "/msg nickserv help"

  • Open a page within a region on another page?

    Hello!
    Is it possible to open a page, within a region on another page? Similar to the way frames work? I have links in a column on the left side of a page and nothing on the right side (big white space), so I thought I would try to open up a page in the white space, depending on which link was clicked on the left side.
    Thanks!

    Hi - aren't you in danger of overcomplicating this?
    If you put your links in an APEX List, you could branch to the different pages (and always have the list of links in a sidebar on the left), so the effect would be similar.
    The thing is, you need the pages in order to have the content to pull in, so you're not saving on the work of creating and maintaining the pages, plus you need to fiddle with the template for those pages to remove headings etc. Also, you can get some interesting side-effects if you implement branching on the pages.
    It is possible to have an iframe in a region on a page that references another page. For a reason I forget now we implemented this as a dynamic PL/SQL region, a bit like this (purists look away now):
    declare
      l_html VARCHAR2(4000);
    begin
      l_html := '<table><td><tr>';
      l_html := l_html || '<iframe name="Messages" height="220" width="950" frameborder="0" src="f?p=&APP_ID.:110:&SESSION.:::::" scrolling="auto">
    </iframe>';
      l_html := l_html || '</tr></td></table>';
      htp.p(l_html);
    end;It wouldn't be hard to make the page number (110 in the above example) dynamic depending on what link or button you clicked.
    Another thing you could do is to have a completely dynamic PL/SQL region, using a function that perhaps retrieved a chunk of text from a database table, and then you'd probably want to implement it via Ajax...
    Wait, did I say something about not overcomplicating things? I don't know, APEX gets you that way...
    John.

  • How to find referenced photos within the Photos app

    Problem:
    Upon instructing Photos to use iCloud Photo Library, the app informed me:
    "104 referenced files in your library will not upload to iCloud Photo Library. Select referenced files in your library and choose 'Consolidate' from the File menu to copy the original files into the library."
    I do not know which 104 images in my library are referenced, and therefore cannot use "Consolidate" to import the masters into the library.
    Can anyone tell me how to find referenced files, within the active library in the Photos app?
    I am not asking how to use the "Show Referenced File in Finder" menu command. I need to identify a file as referenced first, hence this post!

    Gotcha - came up with a workaround... since the photos were living in the Photo Library packaged itself, and not simply in another regular folder, I right clicked on the library and said show packaged content, then search for what folders the files lived in, then copied the files out of the packaged library into a folder. Then I was able to give the Photos Library access to the new folder with the files.
    With all my files now references, I enabled iCloud Photo Library and am uploading now.
    Hopefully my new local Photo Library will be smart enough to optimize local images and shrink to give me more space.
    Thanks.

  • Linking an image from one page to an image within a slideshow on another page.

    I would like to link an image on my home page with an image within a slideshow on another page of my website. I can create the link, but when I click on the link, instead of taking me to the image within the slideshow, it takes me to the first image of the slideshow which I don't want. Is there a way to link to an image "within" the slideshow and not the first image?

    Hi
    You can create pages with specific images and then use link of images which will open the page with that specific image, link images within slideshow to show exact image within would not be possible with native Muse feature as by default slideshow will open the first image in target.
    Thanks,
    Sanjit

  • On a 3 system network and utilizing a network harddrive to store the profiles, 2 systems work fine, the 3rd indicates 'file being used' and wants to use another profile.

    On a 3 system network, utilizing a network harddrive to store the 'profile folder', 2 systems work fine as long as only one is used at a time, but the 3rd system shows a 'profile in use' error all the time and wants to use another profile. 2 of the systems are running Win7 64-bit and 1 is running XP 32-bit. One of the Win 7 systems and the XP system work fine utilizing the same profile on the network harddrive. The two working systems have been shutdown and the error continues for the third system. All 3 systems are running Firefox 3.6.6. What is the problem? Please note that the same setup was used for Thunderbird and ALL 3 systems worked as planned.
    == 3rd system was setup to use the same profile

    Hi Torsten,
    Thanks for your reply.
    netsh winhttp show proxy revealed that proxy settings were set to a test proxy without bypassing local addresses.
    I used netsh winhttp set proxy proxy-server="http=proxy.mydomain.net:8080" bypass-list="*.mydomain.net;<local>"
    to set the correct proxy settings, restarted the server and updates started coming in.
    Source:
    http://serverfault.com/questions/427058/why-is-windows-update-suddenly-failing-with-error-0x80244019
    Grts.

  • On Excel 2013 (64 bit), I can't use the Analysis ToolPack add-ins without a problem and plot the residuals.

    On Excel 2013 (64 bit), I can't use the Analysis ToolPack add-ins without a problem and plot the residuals. It went crash.

    Hi,
    In regarding of the issue, please provide us more information to assist you better.
    Do you mind telling us the Excel version number? Like 15.0.XXXX.1000
    Would you like to collect the Event Log and App Crash dump file to do further troubleshooting?
    As far as I know, if Excel crashes when using Analysis ToolPack add-ins, it usually causes by the >>Faulting module name: mso.dll<<, Please try the following method and check if it is helpful:
    1.Copy/paste the Mso.dll from another PC.
    2.Click "Start" and "Computer."
    3.Double-click "C: Drive," "Windows" and "System32." The System32 folder opens.
    4.Drag the Mso.dll file on your desktop into the System32 folder.
    5.Click "Start," type "cmd" into the search field and press "Enter" to open the Command Prompt.
    6.Type "regsvr32 mso.dll" (without the quotation marks) into the Command Prompt and press "Enter."
    7.Close the Command Prompt and restart your computer.
    Then, if the Faulting module name is not MSO.Dll, you also can upload(Or send to us via email
    [email protected])  the Event Log/App Crash dump file. We'd like to do further troubleshooting.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Can I successfully revert to an older iTunes or is it time to use another player?

    I've used iTunes and Apple products for close to 10 years but it seems as though each update over the last 4 or 5 years has made the experience worse and worse. The latest version (12) is the pits. I have an iPhone 5 that I sync music and podcasts and other things with my iTunes. It wouldn't recognize my phone and when I finally got that fixed, it wouldn't sync my phone. Then it synced my phone by wiping nearly everything off of it all on it's own. Can I revert back to an older version of iTunes (and a happier time)? Or is it in my best interest to start using another player?  I'd like to be able to continue to do that in the future. Thanks in advance for any guidance or advice that you can give me.

    If you really want to roll back to 11.4 uninstall all iTunes/Apple components, restore the pre-upgrade version of the library as described in Empty/corrupt iTunes library after upgrade/crash, then download and install from one of these direct links:
    iTunes 11.4.0.18 for Windows (32-bit) - iTunesSetup.exe (2014-09-09)
    iTunes 11.4.0.18 for Windows (64-bit) - iTunes64Setup.exe (2014-09-09)
    If you have trouble uninstalling or reinstalling see Troubleshooting issues with iTunes for Windows updates.
    You might want to give the new interface a chance as there is no guarantee that you won't have similar driver problems to resolve after rolling back. If your device is running iOS 8 you cannot use any version of iTunes before 11.4.
    tt2

  • Could i use another database

    Im wondering if i can use another database for the workflow engine. I mean it comes with a database managment by default i want to know if a can use another one (SQL server)

    Hi,
    We have been using jtds driver , which is free and the fastest and without any bugs until now, we have been using it for 4 months now.
    The part below explain how to set up your mssql server with jtds driver.
    create a db lets call is bpel
    then run these queries on it. basically to create the tables, these files are
    domain_sqlserver.ddl
    server_sqlserver.ddl
    workflow_sqlserver.sql
    sensor_sqlserver.sql
    located at
    /OraBPELPM_1/integration/orabpel/system/database/scripts
    After that download the jtds driver for sql server.
    We do not use the microsofts jdbc driver for mssql, although we have tried it.
    It doesnt work properly, with the bpel process manager, basically it has some problem with select image and blob types from DB.
    Anyways, the best one we found was for jtds, it works great and is the fastest I beleive.
    We used data direct's jdbc driver but its not free and after doing some benchmark tests we found jtds was the fastest.
    mkdir -p jdbc/jTDS/unzip
    cd jdbc/jTDS/unzip
    download the jtds-1.2-dist.zip from
    wget http://surfnet.dl.sourceforge.net/sourceforge/jtds/jtds-1.2-dist.zip
    unzip jtds-1.2-dist.zip
    cd unzip
    cp jtds-1.2.jar OraHome_1/integration/orabpel/system/appserver/oc4j/j2ee/home/applib/
    You will now have to configure MsSQL in your data-sources.xml file.
    Microsoft SQL Server Database Configuration
    Oracle Bpel now needs to be configured to use Microsoft SQL Server, using the JDBC drivers.
    cd OraHome_1/integration/orabpel/system/appserver/oc4j/j2ee/home/config/
    vi data-sources.xml
    You must then place the following xml within the file:
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="BPELServerDataSource"
    location="jdbc/BPELServerDataSourceWorkflow"
    xa-location="BPELServerDataSource"
    ejb-location="jdbc/BPELServerDataSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="BPEL_user"
    password="bpeluser!">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="AdminConsoleDateSource"
    location="jdbc/AdminConsoleDateSource"
    xa-location="AdminConsoleDateSource"
    ejb-location="jdbc/AdminConsoleDateSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="user_name"
    password="password">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="BPELSamplesDataSource"
    location="jdbc/BPELSamplesDataSource"
    xa-location="BPELSamplesDataSource"
    ejb-location="jdbc/BPELSamplesDataSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="user_name"
    password="password">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    Run the BPEL server and everything should work fine.

  • Use another LDAP server (OPENLDAP)

    Hi:
    I really have to use another ldap server than oid... we have an openldap server (ldap v3) under linux and i want urgently to use it with portal...
    Anyone here have implemented portal authentication with Openldap under linux ?
    Please tell me the way you do it...
    thanks

    while debugging wwsso_log$, after creating this procedure in portal_sso:
    SQL> CREATE OR replace PROCEDURE debug_print (str VARCHAR2) AS
    2 PRAGMA autonomous_transaction;
    3 BEGIN
    4
    5 INSERT INTO wwsso_log$ VALUES
    6 (wwsso_log_pk_seq.nextval,
    7 substr(str, 1, 1000),
    8 sysdate,
    9 dbms_session.unique_session_id
    10 );
    11 /
    I have saw these exceptions:
    PORTALcncn=orcladmin********cn=Login Server (portal_sso),dc=ipb,dc=ptldap.ccom.ipb.pt389
    Unknown exception in auth_ldapORA-06520: PL/SQL: Erroao carregar biblioteca externa
    ORA-06522: Unable to load DLL
    exception: authenticate user
    exception authenticate_user: ORA-06520: PL/SQL: Erroao carregar biblioteca externa
    ORA-06522: Unable to load DLL
    exception generate_redirect: ORA-06520: PL/SQL: Erroao carregar biblioteca externa
    ORA-06522: Unable to load DLL
    My steps where all done ok:
    SQL> create or replace library auth_ext as 'D:\oracle\ora81\bin\ssoxldap.dll';
    2 /
    Biblioteca criada.
    SQL> commit;
    Confirmagco conclumda.
    The DLL is there:
    Directory of D:\oracle\ora81\bin
    02-11-00 02:12 48.128 ssoxldap.dll
    1 File(s) 48.128 bytes
    55.033.856 bytes free
    The LSNRCTL is working
    D:\oracle\ora81\bin>lsnrctl status extproc_connection_data.sa.ipb.pt
    LSNRCTL for 32-bit Windows: Version 8.1.7.3.0 - Production on 17-MAI-2002 17:00:
    50
    (c) Copyright 1998 Oracle Corporation. All rights reserved.
    A ligar a (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0))(CONNECT_DATA=(SID=PLSExtProc)(PRESENTATION=RO)))
    STATUS do LISTENER
    Pseud=nimo LISTENER
    Verspo TNSLSNR for 32-bit Windows: Version 8.1.7.3.0 - Produc
    tion
    Data de Infcio 17-MAI-2002 14:23:13
    Tempo de funcionamento 0 dias 2 hr. 37 min. 37 seg
    Nfvel de Diagn=stico off
    Seguranta OFF
    SNMP OFF
    Fich. Parametros Listener D:\oracle\ora81\network\admin\listener.ora
    Fich. Diario do Listener D:\oracle\ora81\network\log\listener.log
    Resumo dos Servitos...
    PLSExtProc has 1 rotinas de tratamento de servito
    dbon has 1 rotinas de tratamento de servico
    dbon has 2 rotinas de tratamento de servico
    and the LDAPSEARCH is also working:
    D:\oracle\ora81\bin>ldapsearch -h ldap.ccom.ipb.pt -p 389 -D cn=orcladmin -b "cn=Login Server (portal_sso),dc=ipb,dc=pt" -v "cn=PORTAL"
    ldap_open( ldap.ccom.ipb.pt, 389 )
    padrpo de filtro: cn=PORTAL
    a devolver: ALL
    o filtro T: (cn=PORTAL)
    cn=PORTAL, cn=Login Server (portal_sso),dc=ipb,dc=pt
    sn=PORTAL
    cn=PORTAL
    userPassword=xxxxxxxxxx
    objectClass=top
    objectClass=person
    1 correspondencias
    What's WRONG ?
    Thanks

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • Cross Reference within external Database using XREF API

    Hi Experts,
       Can we do Cross Reference within external Database using  XREF API uses JDBC to access the Oracle Database Stored Procedures in SAP PI? How to use a JNDI Data source to access the DB and how to do the Connection Pooling will be done by the SAP J2EE server? Kindly let me know step by step proceedings.
    Regards
    Archana

    Hello Archana,
    It can be done with a Lookup call in a mapping.
    Here's a little article about the topic in the SAP wiki:
    http://wiki.sdn.sap.com/wiki/display/XI/HowtouseCrossReferencewithinexternal+Database
    With kind regards
                     Sebastian

Maybe you are looking for

  • SSD fails to verify after kernel panic?

    I have been using a 256GB Samsung 840 Pro SSD as my main boot drive in my MBP for about 6 months now with no issues. Last week, I randomly got a kernel panic and had to reboot my mac, however, it failed to boot. After opening the recovery tools, the

  • Firefox is set as the default browser, but if I click a link in MS Word, the link is opened with MS Internet explorer. Why?

    Firefox is set as the default browser, but if I click a link in MS Word, the link is opened with MS Internet explorer. Why?

  • How can I keep track of ans of quest ???? [Struts]

    hi, I am trying to develop Question-Answer pages using struts. The problem is when user selectes the right option(radio button) of different different quest. how can i keep track of these selected radio buttons ??? I mean how can i trace the value of

  • Suggestion for Moderators

    Just a suggestion but how about putting a 'sticky' thread at the top of this forum as an FAQ? e.g. link to documentation can be found HERE... Download the application HERE... Common issues which keep being raised (like the agent test only performing

  • Low buffer hit ratio

    Hi all, could anyone please let me know how I can improve upon the buffer hit ratio in Oracle 8.0 I have increased my buffer size by 40% in the init.ora parameters but there has been no gain at all in the buffer hit ratio after the system has been bo