SIMP IP design 1. Design SIMD IP by modifying RTL code (submission of code) 2. Implement API (name is perform_simd1) for

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

SIMP IP design 1. Design SIMD IP by modifying RTL code (submission of code) 2. Implement API (name is perform_simd1) for

Post by answerhappygod »

SIMP IP design
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 1
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 1 (35.51 KiB) Viewed 46 times
1. Design SIMD IP by modifying RTL code (submission of
code)
2. Implement API (name is perform_simd1) for using SIMD IP
(submission of code)
3. Implementation of Application code implementing the example
presented (submission of code)
4. Simulation and verification of examples presented (submission of
waveform screen capture)
Hint - Implement the perform_simd function separately, then
output the result as a z variable.
Logic for SIMD
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 2
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 2 (53.69 KiB) Viewed 46 times
API for SIMD
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 3
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 3 (44.15 KiB) Viewed 46 times
Application for validation
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 4
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 4 (30.34 KiB) Viewed 46 times
RTL code to modify with reference
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 5
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 5 (250.63 KiB) Viewed 46 times
API code to modify with reference / Application code
to modify with reference
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 6
Simp Ip Design 1 Design Simd Ip By Modifying Rtl Code Submission Of Code 2 Implement Api Name Is Perform Simd1 For 6 (149.09 KiB) Viewed 46 times
please help me ㅠㅠ
Core1 Memory 오용 System interconnect SIMD1_IP 12 98 ? 34 76 ? 56 + 54 ? 78 + 32 ?
test1_apb.v always@(posedge clk, negedge rstnn) begin if(rstnn==0) var_z <= 0; else if(we_z==1'b 1) var_z <= rpwdata; else if(request_add) var_z <= var_x + var_y; else if(request_sub) var_y; var_z <= var_x else if(request_mac) var 7 <= (var_x * var_y) + rpwdata; else if(reqest_simd) var_z <= var_simd; end always@(posedge clk, negedge rstnn) begin if(rstnn==0) var_simd <= 0; else begin end end
main.c #define OFFSET_X 0x0 #define OFFSET_Y 0x4 #define OFFSET_Z 0x8 #define OFFSET_ADD 0xC #define OFFSET_SUB 0xC #define OFFSET_MAX 0x10 #define OFFSET_SIMD 0x14 #define OFFSET_NOI_VALID 0x3 void perform_simd() { }
int main() { set_x(0x6745ABEF); printf("\n%x", get_x()); set_y(0XABAB8967); printf("\n%x", get_y()); perform_simd(); printf("\n%x", get_z()); return 0;
Special IP RTL code - test1_apb.v 1 include "ervp_global.vh" 55 always@(*) 56 begin 3 module TEST1_APB 57 rprdata = 0; is_valid_addr = 0; 4 ( 58 5 clk, 59 we_x = 0; 6 rstnn, 60 we y = 0; 7 61 we_z = 0; 8 62 request_add = 0; rpsel, rpenable, 9 63 request sub = 0; 10 rpaddr, 64 request_mac = 0; 11 rpwrite, 65 12 rpwdata, 66 if(rpsel=1'b 1) 13 rprdata, 67 begin 14 68 rpready, rpslverr 15 69 16 ); 70 17 71 18 // 72 19 / parameter input output */ 73 20 //////////////////////////// 74 21 75 22 parameter BW_ADDR = 1; 76 23 parameter BW_DATA = 1; 77 24 78 25 input wire clk, rstnn; 79 26 input wire rpsel; 80 27 input wire rpenable; 81 28 input wire [BW_ADDR-1:0] rpaddr; 82 29 input wire rpwrite; 83 84 30 input wire [BW_DATA-1:0] rpwdata; 31 output reg [BW_DATA-1:0] rprdata; 85 32 output wire rpready; 86 33 output reg rpslverr; 87 34 88 35 ///////////// 89 36 / signals */ 90 37 ///////////// 91 38 92 39 genvar 1; 93 40 94 41 wire [8-1:0] addr_offset=rpaddr; 95 42 reg is valid_addr; 96 43 97 44 reg [32-1:0] var_x, var_y, var_z; 98 45 reg we_x, we_y, we_z; 99 46 100 47 reg request_add; 101 48 reg request_sub; 102 49 reg request_mac; 103 50 104 105 106 107 108 end end if(rpenable=-1'b 1) begin case(addr_offset) 8'h 0: begin end 8'h 4: begin end 8'h 8: begin end 8'h C: begin end is_valid_addr = 1; rprdata var_x; we_x rpwrite; is_valid_addr = 1; rprdata var_y; we y rpwrite; is_valid_addr = 1; rprdata var_z; we z rpwrite; is_valid_addr = 1; if(rpwrite==1'b 1) request_add = 1; else request sub = 1; is_valid_addr = 1; if(rpwrite==1'b 1) request_mac=1; is_valid_addr = 0; end 8'h 10: begin end default: endcase 109 110 assign rpready = 1; 111 112 always@(posedge clk, negedge rstnn) 113 begin 114 if(rstnn==0) 115 var x <= 0; 116 else if(we_x==1¹b 1) 117 var x < rpwdata; 118 end 119 120 always@(posedge clk, negedge rstnn) 121 begin 122 if(rstnn==0) 123 var y < 0; 124 else if(we_y=-1'b 1) 125 var_y <= rpwdata; 126 end 127 128 always@(posedge clk, negedge rstnn) 129 begin 130 if(rstnn==0) 131 var_z <= 0; 132 else if(we z==1'b 1) 133 var_z <= rpwdata; 134 else if(request_add) 135 136 else if(request_sub) 137 138 else if(request_mac) 139 140 end 141 142 always@(posedge clk, negedge rstnn) 143 begin 144 if(rstnn==0) rpslverr< 0; 145 146 else if(rpsel-=1'b 1) 147 begin 148 if(rpenable=-1'b 0) 149 rpslverr <= 0; 150 else 151 rpslverr <= ~is_valid_addr; 152 end 153 end 154 155 endmodule 156 var_z <= var_x + var_y; var_z <= var_x var_y; var_z <= (var_x * var_y) + rpwdata;
#include "platform_info.h" 2 #include "ervp_printf.h" 3 #include "ervp_reg_util.h" 4 5 #define OFFSET_X 0x0 6 #define OFFSET_Y 0x4 7 #define OFFSET Z 0x8 8 #define OFFSET_ADD exc 9 #define OFFSET_SUB 0xC 10 #define OFFSET MAX 0x10 11 #define OFFSET_NOI_VALID 0x3 12 13 static inline unsigned int get_test1_addr (unsigned int offset) 14 { 15 return (I_TEST1_SLAVE_BASEADDR+offset); 16 } 17 18 void set_x(unsigned int value) 19 ( 20 REG32(get_test1_addr (OFFSET_X)) value; 21 } 22 23 unsigned int get_x() 24 { 25 return REG32(get_test1_addr (OFFSET_X)); 26} 27 28 void set_y(unsigned int value) 29 { 30 REG32(get_test1_addr (OFFSET_Y)) = value; 31 ) 32 33 unsigned int get_y() 34 { 35 return REG32(get_test1_addr (OFFSET_Y)); 36 } 37 38 void set_z(unsigned int value) 39 { 40 REG32(get_test1_addr (OFFSET_Z)) value; 41} API 42 43 unsigned int get_z() 44 { 45 return REG32(get_test1_addr (OFFSET_Z)); 46 ) 47 48 49 void perform_add() 50 { 51 REG32(get_test1_addr (OFFSET_ADD)) = 0; 52 } 53 54 void perform_sub() 55 { 56 int temp; 57 temp = REG32(get_test1_addr (OFFSET_SUB)); 58 ) 60 void perform_mac() 61 ( 62 REG32(get_test1_addr (OFFSET_MAX)) = 3; 63 65 int main() { 66 set_x(3); 67 printf("\n%d", get_x()); set_y(6); 68 69 printf("\n%d", get_y()); set_z(4); 70 71 printf("\n%d", get_z()); perform_add(); 72 printf("\n%d", get_z()); perform_sub(); 73 74 75 76 printf("\n%d", get_z()); perform_mac(); printf("\n%d", get_z()); REG32(get_test1_addr (OFFSET_NOI_VALID)) = exfffffff- return 0; !龙及两万龙刀 龙 龙 88 77 78 79 80 } API Application
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply