Quantcast
Channel: Altera Forums
Viewing all 19390 articles
Browse latest View live

rapidio Gen1 and rapidio Gen2

$
0
0
Dear:
If i want to link two devices, one use rapdio Gen1(RapidIO Interconnect Specification,Revision 2.1) and the other use rapdio Gen2(the RapidIO v2.2 specification). can they work well?
I meet a problem, one device is TMS320C6455(The SRIO peripheral is compliant to V1.2 of the RapidIO Interconnect Specification), the other is Stratix V, if stratix V use gen1, They can establish the rapidio link and communicate each other, but if stratix V use gen2, they can not establish the link. Now i doubt the compatibility of altera rapdio core, who can give some clues to me?
Thank you very much.

Modelsim Altera Edition 10.1e - License not working

$
0
0
Hi,

I have a Modeslim AE License that i try to present to Modelsim but unfortunately, if I start Modelsim AE it shows the infamous message

Unable to checkout a license. Make sure your license file environment variable (e.g., LM_LICENSE_FILE)
is set correctly and then run 'lmutil lmdiag' to diagnose the problem.
Unable to checkout a license. Vsim is closing.
** Fatal: Invalid license environment. Application closing.

So I did the lmutil lmdiag thing and attached the outcome to this thread.
In my opinion, the problem is not that Modelsim does not find the license file as its contents are read by lmutil. So the environment variable is set correctly, right?

What else could be the problem? Is there no modelsim AE license contained in my license file? Since I'm not aware of all Altera vendor IDs, I don't know, if Modelsim is even in there.

I also checked tips from other posts in this forum (like deleting the .quartus and .modelsim files in my home directory which did nothing but discarding all my custom quartus settings . . . ).

I use the Altera tools on Debian Linux. The Quartus II (float) license is read correctly into Quartus during start from our licesnse server. But the Modelsim license is on my local machine.

Regards,
Maik
Attached Files

PRE_FLOW_SCRIPT_FILE problem

$
0
0
Hi.
I am trying to write the script for automatic update compilation time in my project. The script generate_version1.tcl:
Code:

set str [clock format [clock seconds] -format {%Y%m%d%H%M}]


set hex_value ${str}


set num_digits  [string length $hex_value]
set bit_width  [expr { 4 * $num_digits } ]
set high_index  [expr { $bit_width - 1 } ]
set reset_value [string repeat "0" $num_digits]


set fh [open "./version_reg.v" w+ ]
puts $fh "module version_reg (clock, reset, data_out);"
puts $fh "    input clock;"
puts $fh "    input reset;"
puts $fh "    output \[$high_index:0\] data_out;"
puts $fh "    reg \[$high_index:0\] data_out;"
puts $fh "    always @ (posedge clock or negedge reset) begin"
puts $fh "        if (!reset)"
puts $fh "            data_out <= ${bit_width}'h${reset_value};"
puts $fh "        else"
puts $fh "            data_out <= ${bit_width}'h${hex_value};"
puts $fh "    end"
puts $fh "endmodule"
close $fh

This script generate version_reg.v file which contain the time. version_reg.v file included in my project.

I run:Tools->Tck Scripts...->generate_version1.tcl and this method work correct. I try to launch this cript automaticaly by adding in my qsf file:
Code:

set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:generate_version1.tcl"
But then I launch compilation, the script does not execute.
Operation system : Windows7
Quartus:13.0.1
PATH: C:\altera\13.0sp1\quartus\bin64

Also I try to use Tcl Console: "quartus_sh generate_version1.tcl" and have error:
Code:

Error:invalid command name "quartus_sh"
Error:    while executing
Error:"unknown_original quartus_sh generate_version1.tcl"
Error:    ("eval" body line 1)
Error:    invoked from within
Error:"eval unknown_original $cmd $args"
Error:    (procedure "::unknown" line 7)
Error:    invoked from within
Error:"quartus_sh generate_version1.tcl"

Please, help me to solve my problem.

Arria V PCIe Hard IP sees stale data

$
0
0
Can anyone explain this failure ... I am looking on the X1 link but need to verify if the write data in the FPGA went to the correct IMEM location.

Looks like the write data is returned after the third read.

Reloading the FPGA appears to correct the issue ....

Thanks in Advance
Attached Images

Verilog/VHDL versus high level functions.

$
0
0
Im new to this, coming from audio programming in MSP/Reaktor and lower level assembler.
So I have to learn a lot about the FPGA stuff as I go along.

But two things came to mind.
It was hinted that higher and lower level coding and patching would not make as much of a difference as it does using these in computational languages. Is this so? Can I asume an all code project wether Verilog, VHDL or high level are more or less the same speed and size?

And since im opting to learn one low level language which one should it be?
For not running into trouble grabbing MIDI, buffers (RAM), waveform generation, HD's (sata), DAC's, ADC's and the likes..

Simulation problem with simple edge detector

$
0
0
I have a very simple edge detector and I'm confused as to why I get this very small blip (pulse) on my output when it detects an edge. I ran into this in a larger design so I simplified it down to a project with only an edge detector. I have a clock, reset and an input that this the rising edge to be detected. The output should be a tick one clock period wide. I'm using the normal method/circuit to detect this, but the simulation gives me this little tiny pulse. Why is this? I've seen a simulation online with the same code that didn't have this problem. I've attached the HDL, testbench (very short files) and a pic of my simulation. Any ideas?

Simulation:


My detector:
Code:


library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.STD_LOGIC_UNSIGNED.ALL;


entity RisingeEdgeDetector is
    port(       
            CLK                : in std_logic;           
            RESET                : in std_logic;           
            INPUT                : in std_logic;           
           
            OUTPUT            : out std_logic           
        );
   
end entity RisingeEdgeDetector;

architecture arch of RisingeEdgeDetector is

SIGNAL input_latch    : std_logic;   

begin

process(CLK, RESET)
begin
    if(RESET = '0') then
        input_latch <= '0';
    elsif(rising_edge(CLK)) then
        input_latch <= INPUT;
    end if;
end process;

OUTPUT <= INPUT and (not input_latch);

end architecture arch;

TestBench:
Code:


LIBRARY ieee;                                             
USE ieee.std_logic_1164.all;                               

ENTITY RisingeEdgeDetector_vhd_tst IS
END RisingeEdgeDetector_vhd_tst;
ARCHITECTURE RisingeEdgeDetector_arch OF RisingeEdgeDetector_vhd_tst IS
-- constants                                               
-- signals                                                 
SIGNAL CLK : STD_LOGIC;
SIGNAL INPUT : STD_LOGIC;
SIGNAL OUTPUT : STD_LOGIC;
SIGNAL RESET : STD_LOGIC;
COMPONENT RisingeEdgeDetector
    PORT (
    CLK : IN STD_LOGIC;
    INPUT : IN STD_LOGIC;
    OUTPUT : OUT STD_LOGIC;
    RESET : IN STD_LOGIC
    );
END COMPONENT;
BEGIN
    i1 : RisingeEdgeDetector
    PORT MAP (
-- list connections between master ports and signals
    CLK => CLK,
    INPUT => INPUT,
    OUTPUT => OUTPUT,
    RESET => RESET
    );
init : PROCESS                                             
                                   
BEGIN                                                       
    RESET <= '0';
    wait for 100 ns;
    RESET <= '1';
   
WAIT;                                                     
END PROCESS init;





                                         
PROCESS                                                                               
BEGIN   
    CLK <= '0';
    wait for 10 ns;
    CLK <= '1';
    wait for 10 ns;
END PROCESS; 


PROCESS                                                                               
BEGIN 
    INPUT <= '0';
    wait for 190 ns;
    INPUT <= '1';
    wait for 20 ns;
    INPUT <= '0';
 
WAIT;
END PROCESS; 

                                     
END RisingeEdgeDetector_arch;

Here is the link of the simulation looks normal:
http://fpgacenter.com/examples/basic/edge_detector.php
Attached Images
Attached Files

Cyclone V GX Development Kit and PCIe

$
0
0
Hi,
Is there a working example of a PCIe endpoint for the Cyclone V GX Development Kit? I can't find any reference design for this kit using the PCIe interface..
I tried to modify PCIe examples from other dev kit but the computer is not booting at all when the user design is programmed and selected but it is when the factory default design is selected.
Any idea?
Thanks!
Jocelyn

Elongate pipeline voluntarily

$
0
0
Hi peeps,

Suppose I have a global memory access which, according to profiling, stalls the pipeline very often.

Well, first of all, is there a way to know for how many cycles is the pipeline stalling? Let's say this number is 'P'.

Then, is there a way to elongate the pipeline voluntarily to wait for the memory access without stalling?

For example, in pseudo code:

Code:

var[0] = getFromGlobal(randomIndex)    // Stalls very often
var[1] = var[0]
var[2] = var[1]
...
var[P-1] = var[P-2]
var[P] = var[P-1]
calculate(var[P])      // Use the result

And then, there would be a bypass for when the memory access takes a long time, to put the result directly in var[P] after the result is received.

This way, we could keep inserting the work-items in the pipeline at every clock cycle, and retrieve them at the same rate.

If it's not clear enough, I can try to explain in another way.

AVALON MM interface beginners issues

$
0
0
Hi, I'm trying desperately to experience the AVALON MM interface on a Cyclone V SoC FPGA board.

For my interface implementation I have written a control, an input and an output verilog file, as also some C code running on the HPS. Control, Input and Output are joined by QSYS together with a clock, and an HPS component. A top level verilog file connects the .qip to an algorithm verilog file. The actual algorithm will come later (some ready-made IP core). Currently instead of an algorithm, I'm just lighting LEDs: Initially, in state WAITING, led1. When "input" and a "start" signal come from the control verilog file inside the .qip, it should do the transition to WORKING and light another led2. My problem now, is that it does not work - it stays at lighting led1. I tried another example using AVALON MM and it works, so there should not be anything basic such as MSEL setting, etc.

Here are Control, Input and Output, as below the C code I wrote. I left out the toplevel file as also the.. what I call "algorithm" so far.

Code:

module avalonmm_control (
    input clk,
    input reset,
    output reg debug_led, // DEBUG
    input      [7:0] avs_writedata,
    output reg [7:0] avs_readdata,
    input      [1:0]  avs_address,
    input            avs_read,
    input            avs_write,
    output algostart,
    output algoreset,
    input  algodone
);

// TODO check out, why we use "reg" here?
reg start_reg;
reg reset_reg;

assign algostart = start_reg;
assign algoreset = reset_reg;

always @(posedge clk) begin
    if(avs_write)begin
        case (avs_address)
            2'b00: begin
                reset_reg <= avs_writedata[0];
                start_reg <= 1'd0;
            end
            2'b01: begin
debug_led = 1'b1; // TODO rm, DEBUGGING
                reset_reg <= 1'd0;
                start_reg <= avs_writedata[0];
            end
            default: begin
                reset_reg <= 1'd0;
                start_reg <= 1'd0;
            end
        endcase
    end else if (avs_read) begin
        reset_reg <= 1'd0;
        start_reg <= 1'd0;

        case (avs_address)
            2'b00: avs_readdata[0] <= reset_reg;
            2'b01: avs_readdata[0] <= start_reg;
            2'b10: avs_readdata[0] <= algodone;
            default: avs_readdata[0] <= 1'd0;
        endcase
    end else begin
        reset_reg <= 1'd0;
        start_reg <= 1'd0;

    end
end
endmodule

Code:

module avalonmm_input (
    input clk,
    input reset,
    input        avs_write,
    input [31:0] avs_writedata,
    input [3:0]  avs_address,
    output        alg_write,
    output [31:0] alg_writedata,
    output [3:0]  alg_writeaddr
);
assign alg_write = avs_write;
assign alg_writedata = avs_writedata;
assign alg_writeaddr = avs_address;
endmodule

Code:

module avalonmm_output (
    input clk,
    input reset,
    input        avs_read,
    output [31:0] avs_readdata,
    input  [3:0]  avs_address,
    input  [31:0] alg_readdata,
    output [3:0]  alg_readaddr
);
assign avs_readdata = alg_readdata;
assign alg_readaddr = avs_address;
endmodule

I'm currently trying to light an additional debugging led, on any input, and leave it light - without any success. Either it stays always on or is always off. It seems as if "avs_write" is always true, already in the beginning. As C code, I wrote the following..

Code:

#include <stdlib.h>
#include <stdio.h>
#include <string.h> // memset()
#include <stdint.h> // uint8_t, etc.
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>   

/*******************************************************************************/

#define INPUT_OFFSET 0x0
#define OUTPUT_OFFSET 0x800
#define CONTROL_OFFSET 0xa00
#define INPUT_SIZE 16 
#define OUTPUT_SIZE 16 
#define PAGE_SIZE sysconf(_SC_PAGESIZE)
#define LWHPS2FPGA_BASE 0xff200000
#define SEQUENCE_SIZE 16

/*******************************************************************************/

typedef struct fpgactrl{
        void *mem;
    volatile uint32_t *input;
    volatile uint32_t *output;
    volatile uint32_t *control;
    /*
      control states / orders configured in FPGA:
          2'b00 - reset
          2'b01 - start
          2'b10 - done
    */
    int fd;
} fpgactrl_t;
typedef fpgactrl_t* fpgactrl_p;

typedef struct sequence{
    int size;
    uint8_t sequence[SEQUENCE_SIZE];
} sequence_t;
typedef sequence_t* sequence_p;

/*******************************************************************************/

int fpga_init(struct fpgactrl* fpga)
{
    if (0 > (fpga->fd = open("/dev/mem", O_RDWR))) {
        fprintf(stderr, "FAILED, %s [%d]: fpga->fd < 0\n", __FILE__, __LINE__);
        return -1; // FAIL
    }

    if (MAP_FAILED == (fpga->mem = mmap(NULL, PAGE_SIZE
                        , PROT_READ | PROT_WRITE, MAP_SHARED
                        , fpga->fd, LWHPS2FPGA_BASE))) {
        perror("FAILED");
        fprintf(stderr, "%s [%d]: MAP_FAILED == (fpga->mem = mmap(...))\n", __FILE__, __LINE__);
        close(fpga->fd);
        return -1; // FAIL
    }
    fpga->input = fpga->mem + INPUT_OFFSET;
    fpga->output = fpga->mem + OUTPUT_OFFSET;
    fpga->control = fpga->mem + CONTROL_OFFSET;
    return 0; // OK
}

void fpga_reset(struct fpgactrl* fpga)
{
    fpga->control[0] |= 0x1;
    while (fpga->control[0] & 0x1) ;
}

void fpga_start(struct fpgactrl* fpga)
{
    fpga->control[1] |= 0x1;
    while (fpga->control[1] & 0x1) ;
    fprintf(stderr, "XXX: fpga started\n");    // the message comes
}

void fpga_done(struct fpgactrl* fpga)
{
    while ((fpga->control[2]) & 0x1) ;
}

void fpga_copy_input(struct fpgactrl* fpga, uint8_t* input)
{
    int idx;
    for (idx=0; idx<INPUT_SIZE; ++idx) {
        fpga->input[idx] = (uint32_t*) input[idx];
    }
}

void fpga_copy_output(struct fpgactrl* fpga, uint8_t* output)
{
    int idx;
    for( idx=0; idx < OUTPUT_SIZE; ++idx){
        output[idx] = (uint8_t*) fpga->output[idx];
    }
}

void fpga_release(struct fpgactrl* fpga)
{
    munmap(fpga->mem, PAGE_SIZE);
    close(fpga->fd);
}

void sequence_init(struct sequence* seq)
{
    seq->size = 0;
    seq->size = SEQUENCE_SIZE; // static array!
    memset(seq->sequence, '\0', seq->size);
}

void sequence_init_text(struct sequence* seq)
{
    sequence_init(seq);
    memset(seq->sequence, '1', SEQUENCE_SIZE);
}


/*******************************************************************************/


int main(int argc, char* argv[]){
    fpgactrl_t fpga;
    fpgactrl_p ptr_fpga = &fpga;
    sequence_t seq_input, seq_output;
    sequence_p input = &seq_input;
    sequence_p output = &seq_output;

        fprintf(stderr, "init fpga\n");
    if (fpga_init(ptr_fpga)) {
        fprintf(stderr, "FAILED: initialization of fpga controller\n");
        exit(EXIT_FAILURE);
    }

        fprintf(stderr, "set up input\n");
    sequence_init(output);
    sequence_init_text(input);

        fprintf(stderr, "reset fpga\n");
    fpga_reset(ptr_fpga);

        fprintf(stderr, "copy input to fpga\n");
    fpga_copy_input(ptr_fpga, input->sequence);

        fprintf(stderr, "start fpga process\n");
    fpga_start(ptr_fpga);

        fprintf(stderr, "wait for done\n");
    fpga_done(ptr_fpga);

        fprintf(stderr, "copy output from fpga\n");
    fpga_copy_output(ptr_fpga, output->sequence);

        fprintf(stderr, "results: '%s'\n", output->sequence);
    fpga_release(ptr_fpga);
    fprintf(stderr, "READY.\n");
    exit(EXIT_SUCCESS);
}

I kept away the top level and the "algorithm" verilog. The already printed should be boring enough. Anyway, I'm not very positive that anyone really will have the patience to understand my post and read up till here. If YOU did so - I already thank you a lot!!!

Questions:
1. Where can I check by setting an LED if the FPGA is receiving any input, and then that it has input and has received the "start"?
2. Is there any obvious error?
3. What techniques I may use in quartus to debug this? I'm using quartus II web edition, I don't have any license, and no experience in working with oscilloscopes :(

ANY help is appreciated!

alt_irq_init Again!

$
0
0
In my computer,there are three versions:11.0, 9.0 and 8.0. I have used them together for a month, and no problem.
Until two days ago, I compiled my program, error occured!
**** Build of configuration Debug for project hello_world_0 ****
make -s all includes
Compiling hello_world.c...
Linking hello_world_0.elf...
/cygdrive/e/JIDA/9.10next_stage/IN_FIR300why/hello_world_0_syslib/Debug/libhello_world_0_syslib.a(alt_main.o)(.text+0x14): In function `alt_main':
/cygdrive/c/altera/90/nios2eds/components/altera_hal/HAL/src/alt_main.c:102: undefined reference to `alt_irq_init'
collect2: ld returned 1 exit status
make: *** [hello_world_0.elf] Error 1
Build completed in 3.109 seconds

I try many solutions: restarting my computer, deleting the .a file and build again, uninstall 8.0IDE. These three solutions do not work !

Additional, in another computer, only has 9.0 version. It can compile my program successfully! I want to know why ? What happened to my computer, and how to solve it?

pio timing problem

$
0
0
Hi,

i write a 32 bit value coming from a sinc3 filter into my pio register. From there i read it into my nios system using the IORD_ALTERA_AVALON_PIO_DATA(BASE) command. According to the Performance Counter this reading process takes about 1000clock ticks.
I already added an additional output register to my filter. I have added the filter vhdl code as an Attachement.
The nios system clock is 50MHz. The filter clocks are: MCLK = 10MHz and CNR = 39kHz. With this Setting the fir has a filter Response time of 76us.

Thanks for help!
Attached Images

vsim-3170 error: Could not find...while simulating Altera NCO IP

$
0
0
Hi ,


I am quite new to Altera (Xilinx /Actel guy up to date) and I am trying to simulate an Altera NCO IP with frequency modulation input to see its frequency resolution performance.
So, I generated the IP with the Megawizard (Quartus II 9.0 sp2), wrote a simple testebench that modifies the phase increment and the frequency modulation input and the following .do file:



Code:


#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Compile sources & test
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


vcom -work work -nologo -novopt NCO_CORDIC.vho
vcom -work work -nologo tb_dds_cordic.vhd


#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Start simulator
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


vsim  {work.tb_dds_cordic(test)} \
      +notimingchecks \
          -novopt \
      -t ps \ 
add log -r *


set StdArithNoWarnings 1
run 0.0 ns;
set StdArithNoWarnings 0
#--------------------------


do wave_dds_chirp.do


run 50000 us;

I am running Modelsim 6.5b PE . When I run the simulation , the two files compile but I get the error: ** Error: (vsim-3170) Could not find 'C:\FPGA\DDS\work. '. But in the work folder there are the .dbs , .dat files (output of the compile process). Any hint on what could be going on here??


Regards


zermelo

Force certain preloader image at QSPI boot

$
0
0
I am using Altera DevKit with SOCEDS 14.0.

The system boots from QSPI where 2 preloader images

Is there way to force load from specified image?

Simulating Designs with Lower-Level Qsys Systems

$
0
0
I have used the Nios II SBT for Eclipse "Run as Nios II ModelSim" command to generate a simulation environment where the Qsys system is the top-level entity. Now I would like to simulate a design in which the Qsys system is not at the top level.

The Altera wiki site has a document "Simulating Designs with Lower-Level Qsys Systems", which describes how to modify the above simulation files to accomodate designs in which the Qsys system is not the top level, but uses Verilog.

Has anybody tried this with a VHDL design?

sqrtf custom instruction gives sometimes absolutely wrong results

$
0
0
I use Quartus 13.1.0.182 web edition with a Cyclone III FPGA
The project is compiled with the Floating point custom instruction 2.0 from Qsys.

My code calculates the square root and some times the results is absolutely wrong.
I checked (in disassembly) that custom instruction 251 is called like expected.

Here is the code:

Code:

#include "altera_nios_custom_instr_floating_point_2.h"


float temp1, sinDelta, debugVal, cosDelta;


temp1 = sinDelta * sinDelta;
debugVal = 1.0f - temp1;
cosDelta = sqrtf(debugVal);

And here are the variables results (obtained during debugging):

sinDelta: 0.000162738579 (0x392aa4ce)
temp1: 2.64838445e-008 (0x32e37e97)
debugVal: 0.99999994 (0x3f7fffff)
cosDelta: 0.5 (0x3f000000)

The cosDelta should be around "1". Is seems the custom square root encounters issues with results near 1!

Do I do something wrong or is it an Altera implementation bug?

Problem in migrating design from Quartus 9.0 (SOPC) to 13.1 (Qsys)

$
0
0
Hi there,
I installed Quartus 13.1 (update 4) on a new Windows 8.1 PC and I'm trying to migrate some old designs created with Quartus 9.0 sp2 and SOPC builder.
I had no problem in converting the fpga project and the sopc system to the new Qsys.
I also imported the old Nios application and created the BSP project to replace the old syslib: like before, I used the SSS template with uC OSII and interniche stack.
After minor effort everything compiled fine and I'm now able to configure fpga and download the application into the Nios processor. FPGA firmware is operational and so Nios seems to be, but my application hangs somewhere.
I used the debugger feature and I discovered the code hangs in the alt_sys_init, generating an exception.
From what I can understand, this happens as soon as the timer is initialized.
Infact Nios crashes when I hit the macro call: ALTERA_AVALON_TIMER_INIT ( TIMER, timer)
I also tried to insert code at the very beginning of the alt_sys_init function and this works, as long as I don't execute the following auto-generated initialization code. For example, I inserted a long loop where I toggle a PIO connected to a LED and I see the LED flashing. When the loop terminates and the regular part of alt_sys_init is executed, Nios crashes.
Any ideas?

Altera Qsys Generated Pci Express Wrapping

$
0
0
I have problem with pci express avalon busses. Altera's ip core has may input output on generated module. I didnt figure out how to drive all those io.
My board has following pci express signals,
PCIE_PERST_N PCIE_REFCLK_P PCIE_RX_P PCIE_TX_P PCIE_WAKE_N
And i only need tx_en, tx_data, tx_busy, rx_en,rx_data.
How can i wrap qsys generated module?
Thanks.

Problem accessing all available NOR flash memory running uCLinux

$
0
0
Hi,

I kindly request for your expertise to help me with this issue. I have been stuck with this problem about couple weeks already and have search and tried multiple suggestions but still no luck. This includes tried with the latest Linux driver. I have a custom board with a 128MByte NOR flash memory 16 bit databus Part:PC28F00AP33TFA, and am having trouble to access the entire memory. The uClinux was able to detect the NOR flash memory by printing this message: "20000000.flash: Found 1 x32 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x008966"
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x20000,blocks=1023
erase region 1: offset=0x7fe0000,size=0x8000,blocks=4

I know it know it understand there is 128MB because when I "cat /proc/mtd", the mtd0 size reported back is 08000000, which about 134MB, and detected erasesize is 00020000. However, when everything seems to be okay, I tried to "flash_eraseall -j /dev/mtd0", I get error(s):
Erasing 128Kibyte@ 0 -0% complete.20000000.flash: buffer write error (status 0xb0)
flash_eraseall: /dev/mtd0: short write

Not to mention, I can't mount my chip to mtdblock0:( I am using device tree (dts) configuration and am not sure if I missed anything?

The following is my setup:

In Qsys "Generic Tri-State Controller" setting: address width:27, data width:16, Byteenable width:2, Byte per word:2
Top level HDL:
output wire [25:0] flash_address,
inout reg [15:0] flash_data,
.
.
.
wire [26:0] addr_internal;
assign flash_address = addr_internal[26:1];

In uClinux menuconfig:
Device driver--> <*>Memory Technology Device (MTD) support-->
<*> Command line partition table parsing
<*>Openfirmware partitioning information support
<*>Direct char device access to MTD devices
-*- Common interface to block layer for MTD 'translation layers'
<*> Caching block device access to MTD devices
RAM/ROM/Flash chip drivers-->
<*> Detect flash chips by Common Flsah Interface (CFI) probe[*] Flash chip driver advanced configuration options (Flash cmd/query data swapping (NO)[*] Specific CFI Flash gemometry selection[*] Support 8-bit buswidth[*] Support 16-bit buswidth[*] Support 1-chip flash interleave[*] Support 2-chip flash interleave
<*> Support for Intel/Sharp flash chips

Mapping drivers for chip access -->
<*> Flash device in physical memory map based on OF description //I disabled the Flash device in physical memory map

In device tree:
flash: flash@0x0 {
compatible ="ALTR,cfi_flash-13.1", "cfi-flash";
reg =< 0x00000000 0x08000000 >;
bank-width = < 2 >;
device-width = < 1 >;
};

The NOR memory works only if I access half of the memory (67MByte). No erase error or read/write problem, and mounted successful. The only different is configuration of the HDL address bus is 26 bits instead of 27 as following:
In Qsys "Generic Tri-State Controller" setting: address width:26, data width:16, Byteenable width:2, Byte per word:2
Top level HDL:
output wire [25:0] flash_address,
inout reg [15:0] flash_data,
.
.
.
wire [25:0] addr_internal;
assign flash_address = {1'b0, addr_internal[25:1]};

Any help is greatly appreciated:)

Quartus 14.0 University Program?

$
0
0
I am attempting to use the SDRAM controller in Qsys for Quartus 14.0 so I need the Clock Signals for DE-series Board Peripherals component for the SDRAM clock. For previous versions of Quartus it was found in the University Program install but I have been unable to locate an install for Quartus 14.0 and I was wondering what I should use for the SDRAM clock in Qsys.

Are there any limitations about the argument's length in device_virtual_dr_shift?

$
0
0
When we use virtual JTAG interface, can the argument -length be more than 32-bits?
Viewing all 19390 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>