گروه فنی مهندسی آرکام

پروژه های دانشجویی ، آموزش ، مشاوره ، فروش آثار

گروه فنی مهندسی آرکام

پروژه های دانشجویی ، آموزش ، مشاوره ، فروش آثار

گروه فنی مهندسی آرکام

گرداننده و نگارنده : محمد نوری

البرز ، کرج ، گلشهر

09125623558
Nouri.Iut@Gmail.Com

جهت حمایت از این وبلاگ، ما را به یک فنجان چای داغ مهمان کنید.
6273-8111-1003-9762

دنبال کنندگان ۳ نفر
این وبلاگ را دنبال کنید

تبلیغات

آخرین نظرات

پیوندها

۴۵۱ مطلب با موضوع «گروه برق و کامپیوتر» ثبت شده است

data_width      : integer   := 36;

...

sram_dout       : out    std_logic_vector(data_width - 1 downto 0);

...

SRAM_DQ        : inout   std_logic_vector(data_width - 1 downto 0);

...

  process (clk)

  begin

    if rising_edge(clk) then

      sram_din_r1  <= sram_din;

      sram_din_r3  <= sram_din_r1 ;

    end if;

  end process;

...

ADC1_DOUT_P    : in std_logic_vector(11 downto 0);

ADC1_DOUT_N    : in std_logic_vector(11 downto 0);

...

Loop1: for i in 0 to 11 generate

    IBUFDS_inst1 : IBUFDS

    generic map

    (

      CAPACITANCE => "DONT_CARE",

      DIFF_TERM => TRUE

      IBUF_DELAY_VALUE => "0

      IFD_DELAY_VALUE => "AUTO

      IOSTANDARD => "DEFAULT"

    )

architecture behavioral of top is

...

attribute keep : string;

attribute keep of MyClk : signal is "true";

attribute keep of MyData  : signal is "true";

...

begin

...

clk_i : in  std_logic;

clk_o: out  std_logic;

...

signal clk : std_logic := '0';

...

clk_o <= clk;

...

process (clk)

begin

                if ( rising_edge (clk) ) then

                ...

                end if;

end process;

...

-- IBUFG: Global Clock Buffer (sourced by an external pin)

IBUFG_Inst : IBUFG

generic map ( IOSTANDARD => "default")

port map (o => clk, i => clk_i );

#define led_live    PORTD.6

...

unsigned int cntr = 0;  // timer divider

...

interrupt [TIM0_OVF] void timer0_ovf_isr(void)

{

// Place your code here

    // 10 ms

    TCNT0 = 0x64;

   

    cntr = cntr + 10;

    if (cntr == 500)

    {

        led_live = ~led_live;

        cntr = 0;

    }

}

typedef union

{

    unsigned char byte;

    struct

    {

         unsigned char error_code : 3;

         unsigned char command : 2;

         unsigned char enable : 1;

         unsigned char error : 1;

         unsigned char ready : 1;

     }bits;

}register_type

...

registerType *pReg = (registerType*)0x00004000; // XXX_REGISTER_MEMORY

 

pReg->bits.enable = 0;

pReg->bits.error_code = 7;

...

pReg->byte = 0x55

In C#, the long type is 64 bits, while in Microsoft C++, it is 32 bits.!!!

typedef struct Flight

 {

    enum { PASSENGER, CARGO } type;

 

    union

    {

        int npassengers;

        double tonnages

    } cargo;

} Flight;

...

Flight flights[ 1000 ];

...

flights [ 42 ].type = PASSENGER;

flights [ 42 ].cargo.npassengers = 150;

...

flights [ 20 ].type = CARGO;

flights [ 20 ].cargo.tonnages = 356.78;

منظور این که باید به نحوی برنامه نوشت که کمترین فضا را اشغال کند!!!

I'm a Noob in FPGA World!

در کروز آموختم که «بی سواد باش، اما مطیع باش!»

input CLK_50MHz;

...

wire CLK_25MHz;

...

clock_divider clk_div(.clk_in(CLK_50MHz), .clk_out(CLK_25MHz));

...

...

module clock_divider(clk_in, clk_out);

                input clk_in;

                output clk_out;

               

                reg clk_out = 0;

               

                always @(posedge clk_in)

                                clk_out <= ~clk_out;

                               

endmodule

The System Tick Timer (SYSTICK Timer) is a simple 24-bit down counter. The timer can be started and configured with an automatic reload value. If the timer is running and it's IRQ is enabled, it generates periodic interrupts. The System Tick Timer can use the internal clock (FCLK, the free running clock signal on the Cortex-M processor) or the external clock (the STCLK signal on the Cortex-M processor). The System Tick Timer is often used by the RTOS.

 

C:\Xilinx\14.4\ISE_DS\ISE\bin\nt64\mem_edit.bat

# CLOCK PLACEMENT RULES must not be followed...

NET "CLK" CLOCK_DEDICATED_ROUTE = FALSE;

int

sumArray(int n, const int *a)

{

    int i;

    int sum;

 

    sum = 0;

    for(i = 0; i < n; i++) {

        sum += a[i];

    }

 

    return sum;

}

int

sumArray(int n, const int a[])

{

    int i;

    int sum;

 

    sum = 0;

    for(i = 0; i < n; i++) {

        sum += a[i];

    }

 

    return sum;

}

#include <stdio.h>

#include <stdlib.h>

 

int G = 0;   /* a global variable, stored in BSS segment */

 

int main(int argc, char **argv)

{

    static int s;    /* static local variable, stored in BSS segment */

    int a;               /* automatic variable, stored on STACK */

    int *p;            /* pointer variable for malloc below */

 

    /* obtain a block big enough for one int from the HEAP */

    p = malloc(sizeof(int));

 

   (*p)++ ;     /* increment the value pointed to by p */

    *p++;        /* WARNING: increments p itself */

 

ANSI C

C++

void swapint(int *a, int *b)

{

            int temp;

            temp = *a;

 

            *a = *b;

            *b = temp;

}

void swapint(int &a, int &b)

{

            int temp = a;

 

 

            a = b;

            b = temp;

}

 

 

swapint(&i1, &i2);

swapint(i1, i2);

ANSI C

C++

struct foo {int a; float b;}

struct foo f;

struct foo {int a; float b;}

foo f;

typedef struct {int a; float b;} foo;

foo f;

ANSI C

C++

const int ArraySize = 100;

int Array[ArraySize];

const int ArraySize = 100;

int Array[ArraySize];