Write a Verilog module that could read numbers from a text file line by line and sort

Question:

Write a Verilog module that could read numbers from a text file line by line and sort them by a user-defined task. The text file is named as “sort.txt”, which contains 10 positive integers. The ten inputs should be stored in a global integer array that is declared as 

integer ARRAY [9:0];

Write a task to sort this global array in ascending order. The sorted array can occupy the same global array. All the temporary space for sorting should be defined inside the task.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Digital Systems Design Using Verilog

ISBN: 978-1285051079

1st edition

Authors: Charles Roth, Lizy K. John, Byeong Kil Lee

Question Posted: