OpenCores
URL https://opencores.org/ocsvn/complexarithmetic/complexarithmetic/trunk

Subversion Repositories complexarithmetic

[/] [complexarithmetic/] [trunk/] [complex1.sc.cpp] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 tamero
#include "complex1.sc.h"  
2
 
3
void cell1::cell()
4
        {
5
        complex<sc_uint<8> > x, y;
6
        complex<sc_uint<8> > o;
7
 
8
 
9
    x.set_real( in1_re.read() );
10
    x.set_imag( in1_im.read() );
11
    y.set_real( in2_re.read() );
12
    y.set_imag( in2_im.read() );
13
 
14
    o=sqrt(x);
15
 
16
    out_re.write( o.get_real() );
17
    out_im.write( o.get_imag() );
18
 
19
        }
20
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.